Module: Backend::ThemeHelper

Defined in:
app/helpers/backend/theme_helper.rb

Overview

License

Ekylibre - Simple agricultural ERP Copyright (C) 2014 Brice Texier

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <www.gnu.org/licenses/>.

Constant Summary collapse

DEFAULT =
{
  colors: ['#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce', '#492970',
           '#f28f43', '#77a1e5', '#c42525', '#a6c96a'],
  font: {
    family: "'Open Sans', sans-serif",
    size: '14px'
  }
}.freeze

Instance Method Summary collapse

Instance Method Details

#theme_colorsObject


34
35
36
# File 'app/helpers/backend/theme_helper.rb', line 34

def theme_colors
  theme_config[:colors]
end

#theme_configObject


30
31
32
# File 'app/helpers/backend/theme_helper.rb', line 30

def theme_config
  DEFAULT
end

#theme_font_familyObject


38
39
40
# File 'app/helpers/backend/theme_helper.rb', line 38

def theme_font_family
  theme_config[:font][:family]
end

#theme_font_sizeObject


42
43
44
# File 'app/helpers/backend/theme_helper.rb', line 42

def theme_font_size
  theme_config[:font][:size]
end