mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -1,5 +1,5 @@
|
||||
class ColorSchemeColorSerializer < ApplicationSerializer
|
||||
attributes :name, :hex, :opacity
|
||||
attributes :name, :hex
|
||||
|
||||
def hex
|
||||
object.hex # otherwise something crazy is returned
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user