//-Trick needed to pass 'env' to ./layout
block vars
doctype html
html(ng-app='habitrpgStatic')

  head
    block extraHead
    block title
      title=env.t('titleIndex')

    script(type='text/javascript').
      window.env = !{JSON.stringify(env)};

    link(rel='shortcut icon', href='#{env.getBuildUrl("favicon.ico")}?v=3')

    meta(charset='utf-8')
    meta(name='viewport', content='width=device-width, initial-scale=1.0')

    != env.getManifestFiles("static")

  body
    div(ng-controller='AuthCtrl')
      include ./login-modal
      nav.navbar.navbar-inverse.navbar-fixed-top
        .navbar-header
          button.navbar-toggle(type='button', ng-click='isNavbarCollapsed = !isNavbarCollapsed', ng-init='isNavbarCollapsed = true')
            span.sr-only Toggle navigation
            span.icon-bar
            span.icon-bar
            span.icon-bar
          a.navbar-brand(href='/static/front') HabitRPG
        .collapse.navbar-collapse(collapse="isNavbarCollapsed")
          ul.nav.navbar-nav
            li(class='#{menuItem=="features" ? "active" : ""}')
              a(href='/static/features')=env.t('companyAbout')
            li(class='#{menuItem=="videos" ? "active" : ""}')
              a(href='/static/videos')=env.t('companyVideos')
            li
              a(href='http://blog.habitrpg.com/')=env.t('companyBlog')
            li(class='#{menuItem=="plans" ? "active" : ""}')
              a(href='/static/plans')=env.t('groupPlans')
            li(class='#{menuItem=="contact" ? "active" : ""}')
              a(href='/static/contact')=env.t('contactUs')

          button#header-play-button.btn.btn-primary.navbar-btn.navbar-right(ng-click='playButtonClick()')=env.t('playButton')

      .container
        block content

  include ../shared/footer
