Module: Card::Set::Self::Navbox::HtmlFormat

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod030-card-mod-layout/self/navbox.rb,
card/tmpsets/set/mod031-card-mod-layout/self/navbox.rb

Instance Method Summary collapse

Instance Method Details

TODO: the more natural placeholder would be the content of the navbox card, no? Also, the forced division of “raw” and “core” should probably be replaced with a single haml template (for core view)



37
38
39
# File 'card/tmpsets/set/mod030-card-mod-layout/self/navbox.rb', line 37

def navbar_placeholder
  @placeholder ||= Card[:navbox, "*placeholder"]&.content || "Search"
end

#view: coreObject



20
21
22
23
24
25
26
27
# File 'card/tmpsets/set/mod030-card-mod-layout/self/navbox.rb', line 20

view :core do
  form_tag path(mark: :search), method: "get", role: "search",
                                class: classy("navbox-form", "nodblclick") do
    wrap_with :div, class: "form-group w-100" do
      render_navbox
    end
  end
end


14
15
16
17
18
# File 'card/tmpsets/set/mod030-card-mod-layout/self/navbox.rb', line 14

view :navbar do
  # FIXME: not bootstrap class here.
  class_up "navbox-form", "form-inline"
  render_core
end


9
10
11
12
# File 'card/tmpsets/set/mod030-card-mod-layout/self/navbox.rb', line 9

view :navbox, cache: :never do
  select_tag "query[keyword]", "", class: "_navbox navbox form-control w-100",
                                   placeholder: navbar_placeholder
end