Class: Matestack::Ui::Bootstrap::Layout::Sidebar
- Inherits:
-
VueJsComponent
- Object
- VueJsComponent
- Matestack::Ui::Bootstrap::Layout::Sidebar
- Defined in:
- app/concepts/matestack/ui/bootstrap/layout/sidebar.rb
Instance Method Summary collapse
Instance Method Details
#response ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/concepts/matestack/ui/bootstrap/layout/sidebar.rb', line 8 def response div class: "sidebar-wrapper shadow-sm bg-white", id: "sidebar" do nav class: 'sidebar pt-4 px-3' do div class: "sidebar-toggler" do bs_btn variant: :link, attributes: { "@click": "sidebarToggle" } do bs_icon name: "list", size: 25, class: "text-muted" end end div class: "sidebar-top mb-3" do slot slots[:sidebar_top] if slots[:sidebar_top].present? end div class: "sidebar-navigation my-3" do end end end end |
#sidebar_navigation_partial ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/concepts/matestack/ui/bootstrap/layout/sidebar.rb', line 26 def div class: "list-group" do .each do |item| if item[:type] == :link link class: "list-group-item list-group-item-action border-0 rounded", path: item[:path] do bs_icon name: item[:icon], size: 20 if item[:icon] span class: "ps-3", text: item[:text] if item[:text] end else transition class: "list-group-item list-group-item-action border-0 rounded", path: item[:path], delay: item[:delay] || 300 do bs_icon name: item[:icon], size: 20 if item[:icon] span class: "ps-3", text: item[:text] if item[:text] end end end end end |