summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDrew Blessing <drew.blessing@me.com>2014-12-14 19:01:59 -0600
committerDrew Blessing <drew.blessing@me.com>2014-12-15 13:21:26 -0600
commitf06f69b9da81337db14324783b45ea5f55fcf735 (patch)
treedaee94544fb570bc545a229725a0dc8d69bd22dc /lib
parentbe206a514235fe1ca7f35cf018c44202a331cb87 (diff)
downloadgitlab-ce-f06f69b9da81337db14324783b45ea5f55fcf735.tar.gz
Add theme type css class
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/theme.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/gitlab/theme.rb b/lib/gitlab/theme.rb
index b7c50cb734d..a7c83a880f6 100644
--- a/lib/gitlab/theme.rb
+++ b/lib/gitlab/theme.rb
@@ -19,5 +19,19 @@ module Gitlab
return themes[id]
end
+
+ def self.type_css_class_by_id(id)
+ types = {
+ BASIC => 'light_theme',
+ MARS => 'dark_theme',
+ MODERN => 'dark_theme',
+ GRAY => 'dark_theme',
+ COLOR => 'dark_theme'
+ }
+
+ id ||= Gitlab.config.gitlab.default_theme
+
+ types[id]
+ end
end
end