mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
ruby syntax
This commit is contained in:
parent
34a3286870
commit
37c90b1d54
@ -1,3 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Stylesheet is a cached CSS file that allows to easily customize the interface of Fab-Manager with some configurable colors and
|
||||
# a picture for the background of the user's profile.
|
||||
# There's only one stylesheet record in the database, which is updated on each colour change.
|
||||
class Stylesheet < ActiveRecord::Base
|
||||
validates_presence_of :contents
|
||||
|
||||
@ -45,8 +50,9 @@ class Stylesheet < ActiveRecord::Base
|
||||
Stylesheet.primary.paint.to_rgb.insert(3, 'a').insert(-2, ", #{alpha}")
|
||||
end
|
||||
|
||||
def self.css
|
||||
".bg-red { background-color: #{Stylesheet.primary}; }
|
||||
def self.css # rubocop:disable Metrics/AbcSize
|
||||
<<~CSS
|
||||
.bg-red { background-color: #{Stylesheet.primary}; }
|
||||
.bg-red-dark { background-color: #{Stylesheet.primary}; }
|
||||
#nav .nav { background-color: #{Stylesheet.primary}; }
|
||||
#nav .nav > li > a { color: white; }
|
||||
@ -82,6 +88,7 @@ class Stylesheet < ActiveRecord::Base
|
||||
.social-icons > div:hover { background-color: #{Stylesheet.secondary}; }
|
||||
.profile-top { background: linear-gradient( rgba(255,255,255,0.12), rgba(255,255,255,0.13) ), linear-gradient(#{Stylesheet.primary_with_alpha(0.78)}, #{Stylesheet.primary_with_alpha(0.82)} ), url('#{CustomAsset.get_url('profile-image-file') || '/about-fablab.jpg'}') no-repeat; }
|
||||
.profile-top .social-links a:hover { background-color: #{Stylesheet.secondary} !important; border-color: #{Stylesheet.secondary} !important; }
|
||||
section#cookies-modal div.cookies-consent .cookies-actions button.accept { background-color: #{Stylesheet.secondary}; }"
|
||||
section#cookies-modal div.cookies-consent .cookies-actions button.accept { background-color: #{Stylesheet.secondary}; }
|
||||
CSS
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user