Class: Matestack::Ui::Bootstrap::Components::Navbar
- Inherits:
-
Component
- Object
- Component
- Matestack::Ui::Bootstrap::Components::Navbar
- Defined in:
- app/concepts/matestack/ui/bootstrap/components/navbar.rb
Constant Summary collapse
- POS_ATTRIBUTES =
i[fixed_top fixed_bottom sticky_top]
Instance Method Summary collapse
Instance Method Details
#prepare ⇒ Object
15 16 17 |
# File 'app/concepts/matestack/ui/bootstrap/components/navbar.rb', line 15 def prepare @toggle = self.toggle.is_a?(Hash) ? self.toggle : { position: self.toggle } end |
#response ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/concepts/matestack/ui/bootstrap/components/navbar.rb', line 19 def response nav do bs_container size: "#{container_size.present? ? container_size : "fluid" }" do # custom elements for navbar if [:slots] && [:slots][:custom_items] slot [:slots][:custom_items] else if @toggle[:position] == :left brand_partial if !@toggle[:position].present? || @toggle[:position] == :right end end end end |