diff options
| author | Christian Höltje <docwhat@gerf.org> | 2013-06-03 12:34:07 -0400 |
|---|---|---|
| committer | Christian Höltje <docwhat@gerf.org> | 2013-06-05 11:17:13 -0400 |
| commit | 15d54b29649652226dc62044680913640be6e407 (patch) | |
| tree | 3d52c17fdc300e4cd9ccddb499fb6e4d2729f3b9 /app/helpers/application_helper.rb | |
| parent | 336750c916498e99505f593067d4eeadccb3c261 (diff) | |
| download | gitlab-ce-15d54b29649652226dc62044680913640be6e407.tar.gz | |
design pages now uses the COLOR_SCHEMES
This unifies the code color-scheme code and makes
adding new schemes a little easier.
Diffstat (limited to 'app/helpers/application_helper.rb')
| -rw-r--r-- | app/helpers/application_helper.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 488a55b2e6c..5287bb0b458 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -4,12 +4,23 @@ require 'uri' module ApplicationHelper COLOR_SCHEMES = { 1 => 'white', - 2 => 'black', + 2 => 'dark', 3 => 'solarized-dark', 4 => 'monokai', } COLOR_SCHEMES.default = 'white' + # Helper method to access the COLOR_SCHEMES + # + # The keys are the `color_scheme_ids` + # The values are the `name` of the scheme. + # + # The preview images are `name-scheme-preview.png` + # The stylesheets should use the css class `.name` + def color_schemes + COLOR_SCHEMES.freeze + end + # Check if a particular controller is the current one # # args - One or more controller names to check |
