Hamburger Icon bootstrap-sass gem

时间:2016-07-11 19:35:11

标签: ruby-on-rails ruby twitter-bootstrap haml

I have managed to a collapsable menu, but I can't get the hamburger icon to show, here is my application.html.haml code:

!!!
%html
%head
  %title "Log My Workout"
  %meta{:name => "viewport", :content => "width=device-width, initial-scale=1"}
  = stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true 
  = javascript_include_tag 'application', 'data-turbolinks-track' => true 
  = csrf_meta_tags 
%body
  %nav.navbar.navbar-default{role: "navigation"}
    .container-fluid
      .navbar-header
        %button.navbar-toggle{"data-target" => ".navbar-ex1-collapse", "data-toggle" => "collapse","aria-expanded" => "false"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
        %ul.nav.navbar-nav.navbar-right
          %li.active
            = link_to "Login", new_user_path


  .container
    = yield

1 个答案:

答案 0 :(得分:0)

Not an expert in Haml, but it looks like your %span.icon-bar rows should be indented beneath the button tag.