Module: Card::Set::All::Bar::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb
Instance Method Summary collapse
-
#bar_menu_items ⇒ Object
-
#bar_wrap_data ⇒ Object
-
#build_accordion_bar(open: false) ⇒ Object
-
#build_bar ⇒ Object
-
#class_up_cols(classes, cols, context = nil) ⇒ Object
-
#prepare_bar(two_cols, three_cols = nil) ⇒ Object
NOTE: currently bar always turns to mini-bar at md.
-
#view: accordion_bar ⇒ Object
-
#view: bar ⇒ Object
-
#view: bar_body ⇒ Object
-
#view: bar_bottom ⇒ Object
-
#view: bar_left ⇒ Object
-
#view: bar_menu ⇒ Object
-
#view: bar_middle ⇒ Object
-
#view: bar_right ⇒ Object
-
#view: closed_bar ⇒ Object
-
#view: expanded_bar ⇒ Object
-
#view: mini_bar ⇒ Object
-
#view: open_bar ⇒ Object
Instance Method Details
#bar_menu_items ⇒ Object
62 63 64 65 66 67 68 69 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 62 def [ full_page_link(text: "page"), modal_page_link(text: "modal"), edit_link(:edit, text: card.new? ? "create" : "edit"), bridge_link(text: "advanced") ] end |
#bar_wrap_data ⇒ Object
89 90 91 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 89 def full_page_card == card ? wrap_data : full_page_card.format.wrap_data end |
#build_accordion_bar(open: false) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 48 def open: false class_up "accordion-item", "bar #{classy 'bar'}" accordion_item , subheader: , body: , open: open, context: :accordion_bar end |
#build_bar ⇒ Object
58 59 60 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 58 def wrap { haml :bar } end |
#class_up_cols(classes, cols, context = nil) ⇒ Object
83 84 85 86 87 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 83 def class_up_cols classes, cols, context=nil classes.each_with_index do |cls, i| class_up cls, ["col", context, cols[i]].compact.join("-") end end |
#prepare_bar(two_cols, three_cols = nil) ⇒ Object
NOTE: currently bar always turns to mini-bar at md
72 73 74 75 76 77 78 79 80 81 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 72 def two_cols, three_cols=nil class_up "bar", full_page_card.safe_set_keys class_up_cols %w[bar-left bar-right], two_cols class_up "bar-middle", "d-none d-md-flex" if three_cols class_up_cols %w[bar-left bar-middle bar-right], three_cols, "md" else voo.hide :bar_middle end end |
#view: accordion_bar ⇒ Object
38 39 40 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 38 view :accordion_bar, unknown: :mini_bar do end |
#view: bar ⇒ Object
15 16 17 18 19 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 15 view :bar, unknown: :mini_bar do cols = .size == 3 ? [, ] : [] (*cols) end |
#view: bar_body ⇒ Object
36 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 36 view :bar_body, unknown: true, template: :haml |
#view: bar_bottom ⇒ Object
30 31 32 33 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 30 view :bar_bottom do view = nest_mode == :edit ? :edit : :content render view, home_view: view end |
#view: bar_left ⇒ Object
26 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 26 view(:bar_left, unknown: true) { render_title } |
#view: bar_menu ⇒ Object
35 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 35 view :bar_menu, unknown: true, template: :haml |
#view: bar_middle ⇒ Object
27 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 27 view(:bar_middle, unknown: :blank) { "" } |
#view: bar_right ⇒ Object
28 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 28 view(:bar_right, unknown: :blank) { "" } |
#view: closed_bar ⇒ Object
41 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 41 view :closed_bar, :accordion_bar |
#view: expanded_bar ⇒ Object
46 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 46 view :expanded_bar, :open_bar |
#view: mini_bar ⇒ Object
21 22 23 24 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 21 view :mini_bar, unknown: true do end |
#view: open_bar ⇒ Object
43 44 45 |
# File 'platypus/tmp/set/gem-defaults/mod023-bar_and_box/all/bar.rb', line 43 view :open_bar do open: true end |