Module: Baldur::UiHelperSidebar

Includes:
MarketingHelper, RenderHelper
Included in:
UiHelper
Defined in:
app/helpers/baldur/ui_helper_sidebar.rb

Defined Under Namespace

Classes: SidebarBuilder

Instance Method Summary collapse

Methods included from MarketingHelper

#ui_marketing_action_string, #ui_marketing_configured_brand, #ui_marketing_cta_banner, #ui_marketing_faq_section, #ui_marketing_features_section, #ui_marketing_footer, #ui_marketing_hero_section, #ui_marketing_pricing_tables, #ui_marketing_render_content, #ui_marketing_resolve_brand, #ui_marketing_testimonials_section, #ui_marketing_top_nav

Instance Method Details

#ui_sidebar(primary_links:, secondary_links: [], secondary_label: nil, brand_path: nil, brand_name: nil, brand_wordmark: nil, brand_logo: nil, header_content: nil, footer_content: nil, mobile_header_content: nil, mobile_footer_content: nil, shell_class: nil, &block) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'app/helpers/baldur/ui_helper_sidebar.rb', line 42

def ui_sidebar(primary_links:, secondary_links: [], secondary_label: nil, brand_path: nil, brand_name: nil, brand_wordmark: nil, brand_logo: nil, header_content: nil, footer_content: nil, mobile_header_content: nil, mobile_footer_content: nil, shell_class: nil, &block)
  builder = SidebarBuilder.new(self)
  body_content = capture(builder, &block) if block_given?

  baldur_render "baldur/components/sidebar",
                brand: ui_sidebar_resolve_brand(
                  brand_path: brand_path,
                  brand_name: brand_name,
                  brand_wordmark: brand_wordmark,
                  brand_logo: 
                ),
                primary_links: ui_sidebar_normalize_links(primary_links),
                secondary_links: ui_sidebar_normalize_links(secondary_links),
                secondary_label: secondary_label,
                header_content: builder.header_content.presence || header_content,
                footer_content: builder.footer_content.presence || footer_content,
                mobile_header_content: builder.mobile_header_content.presence || mobile_header_content || builder.header_content.presence || header_content,
                mobile_footer_content: builder.mobile_footer_content.presence || mobile_footer_content || builder.footer_content.presence || footer_content,
                shell_class: shell_class,
                collapsed: ui_sidebar_collapsed?,
                body_content: body_content
end