nav.navbar.navbar-default.navbar-static-top
  .navbar-header
    button.navbar-toggle.collapsed(type='button', data-toggle='collapse', data-target='#navbar', aria-expanded='false', aria-controls='navbar')
      span.sr-only Toggle navigation
      span.icon-bar
      span.icon-bar
      span.icon-bar
    a.navbar-brand(href='/') Project name
  #navbar.navbar-collapse.collapse
    ul.nav.navbar-nav
      li(class=(title == 'Home') ? 'active' : null)
        a(href='/') Home
      li
        a(href='/contact') Contact
    ul.nav.navbar-nav.navbar-right
      if user
        li(class=(title == 'Account Management') ? 'active' : null)
          a(href='/account') My Account
        li
          a(href='/logout') Logout
      else
        li(class=(title == 'Log in') ? 'active' : null)
          a(href='/login') Log in
        li(class=(title == 'Sign up') ? 'active' : null)
          a(href='/signup') Sign up

nav.navbar.navbar-default.navbar-static-top
  .navbar-header
    button.navbar-toggle.collapsed(type='button', data-toggle='collapse', data-target='#navbar', aria-expanded='false', aria-controls='navbar')
      span.sr-only Toggle navigation
      span.icon-bar
      span.icon-bar
      span.icon-bar
    a.navbar-brand(href='/') Project name
  #navbar.navbar-collapse.collapse
    ul.nav.navbar-nav
      li(class=(title == 'Home') ? 'active' : null)
        a(href='/') Home
      li
        a(href='/contact') Contact
    ul.nav.navbar-nav.navbar-right
      if user
        li.dropdown(class=(title == 'My Account') ? 'active' : null)
          a.dropdown-toggle(href='#', data-toggle='dropdown')
            if user.picture
              img(src=user.picture)
            | #{user.name || user.email || user.id}&nbsp;
            i.caret
          ul.dropdown-menu
            li
              a(href='/account') My Account
            li.divider
            li
              a(href='/logout') Logout
      else
        li(class=(title == 'Log in') ? 'active' : null)
          a(href='/login') Log in
        li(class=(title == 'Sign up') ? 'active' : null)
          a(href='/signup') Sign up

Use dropdown menu when logged in
Use dropdown menu when logged in
