Class: Matestack::Ui::Bootstrap::Layout::Sidebar
Instance Method Summary
collapse
Methods included from Registry
#bs_accordion, #bs_alert, #bs_avatar, #bs_badge, #bs_breadcrumb, #bs_btn, #bs_btn_group, #bs_card, #bs_carousel, #bs_close, #bs_col, #bs_collapse, #bs_container, #bs_dropdown, #bs_figure, #bs_form_checkbox, #bs_form_input, #bs_form_radio, #bs_form_select, #bs_form_submit, #bs_form_switch, #bs_icon, #bs_list_group, #bs_modal, #bs_navbar, #bs_page_heading, #bs_pagination, #bs_popover, #bs_progress, #bs_row, #bs_scrollspy, #bs_section_card, #bs_sidebar, #bs_smart_collection, #bs_spinner, #bs_tab_nav, #bs_tab_nav_content, #bs_toast, #bs_tooltip
Instance Method Details
#response ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/matestack/ui/bootstrap/layout/sidebar.rb', line 9
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, "@click": "sidebarToggle" do
bs_icon name: "list", size: 25, class: "text-muted"
end
end
div class: "sidebar-top mb-3" do
slot :sidebar_top if slots && slots[:sidebar_top].present?
end
div class: "sidebar-navigation my-3" do
end
end
end
end
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/matestack/ui/bootstrap/layout/sidebar.rb', line 27
def
div class: "list-group" do
context..each do |item|
if item[:type] == :link
a class: "list-group-item list-group-item-action border-0 rounded", href: item[:path] do
bs_icon name: item[:icon], size: 20 if item[:icon]
span item[:text], class: "ps-3" 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 item[:text], class: "ps-3" if item[:text]
end
end
end
end
end
|