Sha256: c940776eafff75543903a75a739c47fa528c3228c99711ecd24f3dbc89d94bd0

Contents?: true

Size: 1.59 KB

Versions: 14

Compression:

Stored size: 1.59 KB

Contents

- container_mode = html_options[:container_mode]
- html_options[:container_mode] = nil
- id = SecureRandom.hex(10)

- case container_mode
  - when :with
    %nav.navbar{ class: html_options[:class] }
      .container
        .navbar-header
          %button.navbar-toggle{ data: { toggle:'collapse', target:"#navbar-#{id}" }, type: 'button'}
            %span.sr-only
              Toggle navigation
            %span.icon-bar
            %span.icon-bar
            %span.icon-bar
          = link_to title, brand_link, :class => 'navbar-brand'
        .collapse.navbar-collapse{ id: "navbar-#{id}" }
          = block
  - when :in
    .container
      .row.clearfix
        .column.col-md-12
          %nav.navbar{ class: html_options[:class] }
            .navbar-header
              %button.navbar-toggle{ data: { toggle:'collapse', target:"#navbar-#{id}" }, type: 'button'}
                %span.sr-only
                  Toggle navigation
                %span.icon-bar
                %span.icon-bar
                %span.icon-bar
              = link_to title, brand_link, :class => 'navbar-brand'
            .collapse.navbar-collapse{ id: "navbar-#{id}" }
              = block
  - else
    %nav.navbar{ class: html_options[:class] }
      .navbar-header
        %button.navbar-toggle{ data: { toggle:'collapse', target:"#navbar-#{id}" }, type: 'button'}
          %span.sr-only
            Toggle navigation
          %span.icon-bar
          %span.icon-bar
          %span.icon-bar
        = link_to title, brand_link, :class => 'navbar-brand'
      .collapse.navbar-collapse{ id: "navbar-#{id}" }
        = block

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
leather-0.2.29 app/views/leather/bootstrap_components/_navbar.html.haml
leather-0.2.27 app/views/leather/bootstrap_components/_navbar.html.haml
leather-0.2.26 app/views/leather/bootstrap_components/_navbar.html.haml
leather-0.2.25 app/views/leather/bootstrap_components/_navbar.html.haml
leather-0.2.24 app/views/leather/bootstrap_components/_navbar.html.haml
leather-0.2.23 app/views/leather/bootstrap_components/_navbar.html.haml
leather-0.2.22 app/views/leather/_navbar.html.haml
leather-0.2.21 app/views/leather/_navbar.html.haml
leather-0.2.20 app/views/leather/_navbar.html.haml
leather-0.2.19 app/views/leather/_navbar.html.haml
leather-0.2.18 app/views/leather/_navbar.html.haml
leather-0.2.17 app/views/leather/_navbar.html.haml
leather-0.2.16 app/views/leather/_navbar.html.haml
leather-0.2.15 app/views/leather/_navbar.html.haml