From f1d6a1fffc9d9712f0973b51c850f10d0872a7ea Mon Sep 17 00:00:00 2001 From: techknowlogick <techknowlogick@users.noreply.github.com> Date: Thu, 5 Jul 2018 17:25:04 -0400 Subject: Add the ability to have built in themes in Gitea (#4198) This makes it easier for user who want to theme but don't have the ability to know how to customize templates all that is required is a change in a config option The reason why I chose the DEFAULT_THEME as variable, as perhaps in the future we will allow users to chose their theme whon logged in just like we do with languages --- modules/templates/helper.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/templates') diff --git a/modules/templates/helper.go b/modules/templates/helper.go index b6c835ad44..8e1a79bc57 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -186,6 +186,9 @@ func NewFuncMap() []template.FuncMap { "ParseDeadline": func(deadline string) []string { return strings.Split(deadline, "|") }, + "DefaultTheme": func() string { + return setting.UI.DefaultTheme + }, }} } -- cgit v1.2.3