include ../shared/mixins.jade

//-Trick needed to pass 'env' to ./layout
block vars
doctype html
html(ng-app='habitrpg', ng-controller='RootCtrl')
  head
    block extraHead
    title Welcome to Habitica! Your Life, the Role Playing Game
    meta(charset='utf-8')
    meta(name='viewport', content='width=device-width, maximum-scale=1')
    meta(property='og:title', content=socialTitle)
    meta(property='og:type', content='website')
    meta(property='og:site_name', content='Habitica')
    meta(property='og:image', content='https://s3.amazonaws.com/habitica-assets/assets/gryphon_logo_300x300.png')
    meta(property='og:url', content='https://habitica.com/social/#{socialPage}')
    meta(property='og:description', content=socialDescription)
    meta(property='fb:app_id', content='128307497299777')
    meta(name='twitter:title' content=socialTitle)
    meta(name='twitter:card' content='summary')
    meta(name='twitter:site' content='@habitica')
    meta(name='twitter:image' content='https://s3.amazonaws.com/habitica-assets/assets/gryphon_logo.png')
    meta(name='twitter:description' content=socialDescription)
    meta(name='apple-itunes-app' content='app-id=994882113')
    meta(name='google-play-app' content='app-id=com.habitrpg.android.habitica')
    link(rel='apple-touch-icon' href='/logo.png')
    link(rel='android-touch-icon' href='/logo.png')
    link(rel='canonical', href='', type='text/html')
    link(rel='shortcut icon', href='/favicon.ico')
    link(rel='mask-icon', href='/favicon.ico')

    link(href='//fonts.googleapis.com/css?family=Lato:400,700', rel='stylesheet', type='text/css')
    link(rel='stylesheet', type='text/css', href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/css/bootstrap.min.css')

    script(type='text/javascript').
      window.env = !{JSON.stringify(env._.pick(env, env.clientVars))};
    != env.getManifestFiles("tmp_static_front")

    script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstrap.min.js')
    script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap.min.js')
    script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap-tpls.min.js')

  body(ng-controller='AuthCtrl')
    include ../static/login-modal
    include ../shared/mixins
    .container
      block content
    // Smart App Banner
    script(type='text/javascript').
      new SmartBanner({
          title: 'Habitica: Gamify Your Tasks',
          author: 'HabitRPG, Inc.',
          button: 'GET',
          store: {
              ios: 'On the App Store',
              android: 'In Google Play'
          }
      });
