Refactor render_theme method
Co-Authored-By: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
parent
e85f9d6867
commit
a8fb9fd701
|
@ -36,12 +36,8 @@ module ThemeHelper
|
||||||
theme.attributes.each do |k, v|
|
theme.attributes.each do |k, v|
|
||||||
next unless ATTRIBUTE_MAP.key?(k)
|
next unless ATTRIBUTE_MAP.key?(k)
|
||||||
|
|
||||||
if ATTRIBUTE_MAP[k].is_a?(Array)
|
Array(ATTRIBUTE_MAP[k]).each do |var|
|
||||||
ATTRIBUTE_MAP[k].each do |var|
|
body += "\t--#{var}: #{get_color_for_key(var, v)};\n"
|
||||||
body += "\t--#{var}: #{get_color_for_key(var, v)};\n"
|
|
||||||
end
|
|
||||||
else
|
|
||||||
body += "\t--#{ATTRIBUTE_MAP[k]}: #{get_color_for_key(ATTRIBUTE_MAP[k], v)};\n"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
body += "\t--turbolinks-progress-color: ##{lighten(theme.primary_color)}\n}"
|
body += "\t--turbolinks-progress-color: ##{lighten(theme.primary_color)}\n}"
|
||||||
|
|
Loading…
Reference in New Issue