Theming: a UI to choose some base colors that are applied to all the site css. CSS compiled outside of asset pipeline.

This commit is contained in:
Neil Lalonde
2014-05-02 17:46:03 -04:00
parent c97de2c449
commit c4d3aa3d47
46 changed files with 596 additions and 310 deletions

View File

@@ -1,5 +1,5 @@
class ColorSchemeColorSerializer < ApplicationSerializer
attributes :name, :hex, :opacity
attributes :name, :hex
def hex
object.hex # otherwise something crazy is returned

View File

@@ -1,9 +1,8 @@
class ColorSchemeSerializer < ApplicationSerializer
attributes :id, :name, :enabled, :can_edit
attributes :id, :name, :enabled, :is_base
has_many :colors, serializer: ColorSchemeColorSerializer, embed: :objects
def can_edit
object.can_edit?
def base
object.is_base || false
end
end