Check for a custom css file to help customization of instances (#1368)
* User can create a custom.scss to customize their instance without modifying gitted files. * Add documentation for customization. * Forgot the helper file * Fix Style to pass codeclimate * Requests from maintainer.th-downstream
parent
9887f8cea2
commit
85ff7666f3
@ -1,8 +1,8 @@
|
||||
$color1: #282c37; // darkest
|
||||
$color2: #d9e1e8; // lightest
|
||||
$color3: #9baec8; // lighter
|
||||
$color4: #2b90d9; // vibrant
|
||||
$color5: #ffffff; // white
|
||||
$color6: #df405a; // error red
|
||||
$color7: #79bd9a; // succ green
|
||||
$color8: #000000; // black
|
||||
$color1: #282c37 !default; // darkest
|
||||
$color2: #d9e1e8 !default; // lightest
|
||||
$color3: #9baec8 !default; // lighter
|
||||
$color4: #2b90d9 !default; // vibrant
|
||||
$color5: #ffffff !default; // white
|
||||
$color6: #df405a !default; // error red
|
||||
$color7: #79bd9a !default; // succ green
|
||||
$color8: #000000 !default; // black
|
||||
|
@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module StyleHelper
|
||||
def stylesheet_for_layout
|
||||
if asset_exist? 'custom.css'
|
||||
'custom'
|
||||
else
|
||||
'application'
|
||||
end
|
||||
end
|
||||
|
||||
def asset_exist?(path)
|
||||
if Rails.configuration.assets.compile
|
||||
Rails.application.precompiled_assets.include? path
|
||||
else
|
||||
Rails.application.assets_manifest.assets[path].present?
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in new issue