html lang="en"
  head
    meta charset="UTF-8"
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    link rel="stylesheet" href="/style.css"
    title The Auction House 
  body
    header
      div
        a.inlbutton#logo_container href="/" target="_self"
          h1 
            | The Auction House
          h2 = get_random_subtitle
        nav
          ul
            - unless is_logged_in 
              li
                a.button#login href="/login" target="_self"
                  | LOG IN 
              li
                a.button#register href="/register" target="_self"
                  | SIGN UP
            - else
              li.coins = "#{COINS_PREFIX}#{session_user.balance}#{COINS_SUFFIX}"
              
              - if session_user.flags != 0 && !session_user.banned?
                li
                  a.inlbutton href="/admin" target="_self" 
                    img.icon src="/icons/shield.svg" alt="Admin Panel"

              li
                a.inlbutton href="/settings" target="_self" 
                  img.icon src="/icons/settings.svg" alt="Settings"

              li
                a.inlbutton href="/logout" target="_self" 
                  img.icon src="/icons/logout.svg" alt="Log out"

              li
                a.inlbutton href="/profile" target="_self" 
                  img.avatar src="#{session_user.avatar}" alt="Profile"

    div class="flash" onclick="this.remove();"
      - flash.each do |k, v|
          div class="flash-#{k}"
            | #{v}
    .content-container.fade-in
      ==yield

