diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/setting/setting.go | 2 | ||||
-rw-r--r-- | modules/template/template.go | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 99b968c880..00dae6f621 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -114,6 +114,7 @@ var ( AdminRepoPagingNum int AdminNoticePagingNum int AdminOrgPagingNum int + ThemeColorMetaTag string // Markdown sttings Markdown struct { @@ -407,6 +408,7 @@ func NewContext() { AdminRepoPagingNum = sec.Key("REPO_PAGING_NUM").MustInt(50) AdminNoticePagingNum = sec.Key("NOTICE_PAGING_NUM").MustInt(50) AdminOrgPagingNum = sec.Key("ORG_PAGING_NUM").MustInt(50) + ThemeColorMetaTag = sec.Key("THEME_COLOR_META_TAG").MustString("#ff5343") sec = Cfg.Section("picture") PictureService = sec.Key("SERVICE").In("server", []string{"server"}) diff --git a/modules/template/template.go b/modules/template/template.go index 6099fcc987..aefb21946d 100644 --- a/modules/template/template.go +++ b/modules/template/template.go @@ -98,6 +98,9 @@ var Funcs template.FuncMap = map[string]interface{}{ return strings.Replace(strings.Replace(str, "%", "%25", -1), "#", "%23", -1) }, "RenderCommitMessage": RenderCommitMessage, + "ThemeColorMetaTag": func() string { + return setting.ThemeColorMetaTag + }, } func Safe(raw string) template.HTML { |