.navbar.navbar-default.navbar-fixed-top{role: "navigation"}
  / Brand and toggle get grouped for better mobile display
  .container
    .navbar-header
      %button.navbar-toggle{data: {target: ".navbar-ex1-collapse", toggle: "collapse"}, type: "button"}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      = link_to(root_path, {name: "top", class: "navbar-brand"}) do
        = image_tag("obs-logo_small.png", width: "32px", alt: "Home", title: 'Home')
    / Collect the nav links, forms, and other content for toggling
    .collapse.navbar-collapse.navbar-ex1-collapse
      %ul.nav.navbar-nav
      - if User.current.is_nobody?
        %ul.nav.navbar-nav.navbar-right
          %li
            = link_to(user_login_path) do
              %i.icon-signin
              Sign In
      - else
        %ul.nav.navbar-nav.navbar-right.hidden-xs
          %li.dropdown
            %a.dropdown-toggle{data: {toggle: "dropdown"}, href: "#", id: "user-dropdown"}
              = user_icon(User.current)
              %b.caret
            %ul.dropdown-menu
              %li
                = link_to(home_path) do
                  %i.icon-home
                  = User.current
              %li
                = link_to(user_logout_path, method: :post) do
                  %i.icon-off
                  Log out
        %ul.nav.navbar-nav.navbar-right.visible-xs
          %li
            = link_to(home_path) do
              %i.icon-home
              = User.current
          %li
            = link_to(user_logout_path, method: :post) do
              %i.icon-off
              Log out
