feat(theme): 自定义主题

This commit is contained in:
naiba
2020-12-19 10:57:10 +08:00
parent a9b1ab9e95
commit 9dbbfac551
9 changed files with 48 additions and 5 deletions

View File

@@ -127,9 +127,10 @@ func (ma *memberAPI) logout(c *gin.Context) {
}
type settingForm struct {
Title string
Admin string
Theme string
Title string
Admin string
Theme string
CustomCSS string
}
func (ma *memberAPI) updateSetting(c *gin.Context) {
@@ -143,6 +144,7 @@ func (ma *memberAPI) updateSetting(c *gin.Context) {
}
dao.Conf.Site.Brand = sf.Title
dao.Conf.Site.Theme = sf.Theme
dao.Conf.Site.CustomCSS = sf.CustomCSS
dao.Conf.GitHub.Admin = sf.Admin
if err := dao.Conf.Save(); err != nil {
c.JSON(http.StatusOK, model.Response{