Skip to content

Commit

Permalink
修复前台切换 theme-custom 不生效
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba authored Feb 26, 2024
1 parent a0c60e4 commit a85ffa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/mygin/preferred_theme.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func PreferredTheme(c *gin.Context) {
if theme, err := c.Cookie("preferred_theme"); err == nil {
if _, has := model.Themes[theme]; has {
// 检验自定义主题
if theme == "custom" && singleton.Conf.Site.Theme != "custom" && !utils.IsFileExists("resource/template/custom/home.html") {
if theme == "custom" && singleton.Conf.Site.Theme != "custom" && !utils.IsFileExists("resource/template/theme-custom/home.html") {
return
}
c.Set(model.CtxKeyPreferredTheme, theme)
Expand Down

0 comments on commit a85ffa9

Please sign in to comment.