Module: Layered::Ui::BreadcrumbsHelper
- Defined in:
- app/helpers/layered/ui/breadcrumbs_helper.rb
Instance Method Summary collapse
Instance Method Details
#l_ui_breadcrumb_item(label, path = nil) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'app/helpers/layered/ui/breadcrumbs_helper.rb', line 11 def (label, path = nil) content_tag(:li, class: "l-ui-breadcrumbs__item") do if path link_to(label, path, class: "l-ui-breadcrumbs__link") else content_tag(:span, label, aria: { current: "page" }) end end end |
#l_ui_breadcrumbs(&block) ⇒ Object
4 5 6 7 8 9 |
# File 'app/helpers/layered/ui/breadcrumbs_helper.rb', line 4 def (&block) items = capture(&block) content_tag(:nav, aria: { label: "Breadcrumb" }, class: "l-ui-breadcrumbs") do content_tag(:ol, items, class: "l-ui-breadcrumbs__list", role: "list") end end |