Module: Card::Set::TypePlusRight::CustomizedBootswatchSkin::Colors::HtmlFormat

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod021-card-mod-bootstrap/type_plus_right/customized_bootswatch_skin/colors.rb,
card/tmpsets/set/mod022-card-mod-bootstrap/type_plus_right/customized_bootswatch_skin/colors.rb

Instance Method Summary collapse

Instance Method Details

#theme_color_picker(name, value) ⇒ Object



72
73
74
75
76
77
78
# File 'card/tmpsets/set/mod021-card-mod-bootstrap/type_plus_right/customized_bootswatch_skin/colors.rb', line 72

def theme_color_picker name, value
  # value = value[1..-1] if value.start_with? "$"
  options = VARIABLE_NAMES[:colors].map { |var| "$#{var}" }
  options << value unless options.include? value
  select_tag "theme_colors[#{name}]", options_for_select(options, value),
             class: "tags form-control"
end

#view: bar_middleObject



88
89
90
91
92
93
94
95
96
97
98
99
# File 'card/tmpsets/set/mod021-card-mod-bootstrap/type_plus_right/customized_bootswatch_skin/colors.rb', line 88

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: coreObject



84
85
86
# File 'card/tmpsets/set/mod021-card-mod-bootstrap/type_plus_right/customized_bootswatch_skin/colors.rb', line 84

view :core, template: :haml do
  @colors = card.theme_colors.reject { |k, _v| k.in? %i[body-bg body-color] }
end

#view: inputObject



67
68
69
70
# File 'card/tmpsets/set/mod021-card-mod-bootstrap/type_plus_right/customized_bootswatch_skin/colors.rb', line 67

view :input, template: :haml do
  @colors = card.colors
  @theme_colors = card.theme_colors
end