Module: Card::Set::TypePlusRight::BootswatchSkin::Colors::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/colors.rb
Instance Method Summary collapse
-
#theme_color_picker(name, value) ⇒ Object
-
#view: bar_middle ⇒ Object
-
#view: core ⇒ Object
-
#view: input ⇒ Object
Instance Method Details
#theme_color_picker(name, value) ⇒ Object
87 88 89 90 91 92 93 |
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/colors.rb', line 87 def theme_color_picker name, value # value = value[1..-1] if value.start_with? "$" = VARIABLE_NAMES[:colors].map { |var| "$#{var}" } << value unless .include? value select_tag "theme_colors[#{name}]", (, value), class: "tags form-control" end |
#view: bar_middle ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/colors.rb', line 109 view :bar_middle do <<-HTML <div class="colorpicker-element"> <div class="input-group-addon"> <span class="bg-body border p-1">Text</span> <span class="bg-dark text-light border p-1">Nav</span> <i class="bg-primary"></i> <i class="bg-secondary"></i> </div> </div> HTML end |
#view: core ⇒ Object
99 100 101 102 103 104 105 106 107 |
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/colors.rb', line 99 view :core, template: :haml do @colornames_with_value = card.colors.with_indifferent_access @colors = @colornames_with_value.to_a[0..9] @grays = @colornames_with_value.to_a[10..-1] @themecolornames_with_value = card.theme_colors.map do |k, v| v.starts_with?("$") ? [k, @colornames_with_value[v[1..-1]]] : [k, v] end end |
#view: input ⇒ Object
82 83 84 85 |
# File 'platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/colors.rb', line 82 view :input, template: :haml do @colors = card.colors @theme_colors = card.theme_colors end |