footer.footer(ng-controller='FooterCtrl')
  div(id='fb-root')
  .container
    .row
      .col-sm-3
        h4=env.t('footerMobile')
        ul.list-unstyled
          li
            a(href='https://itunes.apple.com/us/app/habitica/id994882113?ls=1&mt=8', target='_blank')=env.t('mobileIOS')
          li
            a(href='https://play.google.com/store/apps/details?id=com.habitrpg.android.habitica', target='_blank')=env.t('mobileAndroid')
        if env.isStaticPage
          h4=env.t('language')
          select(ng-change='changeLang()', ng-model='selectedLanguage', ng-options='language.name for language in languages')

      .col-sm-3
        h4=env.t('footerCompany')
        ul.list-unstyled
          if (!env.isStaticPage)
            li
              .btn.btn-sm.btn-success(ng-click='openModal("buyGems",{track:"Gems > Donate"})')
                span.glyphicon.glyphicon-heart
                |&nbsp;
                =env.t('companyDonate')
          li
            a(href='/static/features')=env.t('companyAbout')
          li
            a(target='_blank', href='http://blog.habitrpg.com/')=env.t('companyBlog')
          li
            a(href='http://habitica.wikia.com/wiki/App_and_Extension_Integrations', target='_blank')=env.t('companyExtensions')
          li
            a(href='/static/faq/')=env.t('FAQ')
          li
            a(href='/static/privacy')=env.t('companyPrivacy')
          li
            a(href='/static/terms')=env.t('companyTerms')
          li
            a(href='/static/contact')=env.t('contactUs')
          li
            a(href='/static/merch')=env.t('merch')
      .col-sm-3
        h4=env.t('footerCommunity')
        ul.list-unstyled
          li
            a(target='_blank', href='/static/community-guidelines')=env.t('communityGuidelines')
          li
            a(target='_blank', href='https://habitica.com/#/options/groups/guilds/a29da26b-37de-4a71-b0c6-48e72a900dac')=env.t('communityBug')
          li
            a(target='_blank', href='https://trello.com/c/odmhIqyW/440-read-first-table-of-contents')=env.t('communityFeature')
          li
            a(href='http://habitica.wikia.com/wiki/App_and_Extension_Integrations', target='_blank')=env.t('communityExtensions')
          li
            a(target='_blank', href='http://habitica.wikia.com/wiki/Special:Forum')=env.t('communityForum')
          li
            a(target='_blank', href='http://www.kickstarter.com/projects/lefnire/habitrpg-mobile')=env.t('communityKickstarter')
          li
            a(target='_blank', href='https://www.facebook.com/Habitica')=env.t('communityFacebook')
          li
            a(target='_blank', href='http://www.reddit.com/r/habitrpg/')=env.t('communityReddit')
        h4=env.t('footerDevs')
        ul.list-unstyled
          li
            a(target='_blank', href='http://devs.habitica.com')=env.t('devBlog') + ' - The Forge'
          li
            a(target='_blank', href='/apidoc')=env.t('APIv3')
          li
            a(target='_blank', href='/static/api-v2')=env.t('APIv2')
      .col-sm-3
        if (env.NODE_ENV === 'production' && !env.IS_MOBILE)
          h4=env.t('footerSocial')
          .addthis_toolbox.addthis_default_style(addthis:url='https://habitica.com', addthis:title=env.t('socialTitle'), ng-init='loadWidgets()')
            table
              tr
                td
                  .fb-like(data-href='https://habitica.com/static/front', data-layout='button', data-action='like', data-share='true', data-show-faces='true')
              tr
                td
                  a.twitter-share-button(href='https://twitter.com/intent/tweet?text=Improve+yourself+in+the+land+of+Habitica!&via=habitica&url=https://habitica.com/&count=none')=env.t('tweet')
              tr
                td
                  a.tumblr-share-button(data-href='https://habitica.com/static/front', data-notes='none')
              tr
                td
                  a.addthis_button_google_plusone(g:plusone:size='medium')
              tr
                td
                  iframe(src='/bower_components/github-buttons/github-btn.html?user=habitrpg&repo=habitrpg&type=watch&count=true', allowtransparency='true', frameborder='0', scrolling='0', width='85px', height='20px')
        if (env.NODE_ENV==='development' || env.NODE_ENV==='test') && !env.isStaticPage
          h4 Debug
          .btn-group-vertical
            a.btn.btn-default(ng-click='setHealthLow()') Health = 1
            a.btn.btn-default(ng-click='addMissedDay(1)') +1 Missed Day
            a.btn.btn-default(ng-click='addMissedDay(2)') +2 Missed Days
            a.btn.btn-default(ng-click='addTenGems()') +10 Gems
            a.btn.btn-default(ng-click='addHourglass()') +1 Mystic Hourglass
            a.btn.btn-default(ng-click='addGold()') +500GP
            a.btn.btn-default(ng-click='addMana()') +MP
            a.btn.btn-default(ng-click='addLevelsAndGold()') +Exp +GP +MP
            a.btn.btn-default(ng-click='addOneLevel()') +1 Level
            a.btn.btn-default(ng-click='addQuestProgress()' tooltip="+1000 to boss quests. 300 items to collection quests") Quest Progress Up
            a.btn.btn-default(ng-click='makeAdmin()') Make Admin
            a.btn.btn-default(ng-click='openModifyInventoryModal()') Modify Inventory

  div(ng-init='deferredScripts()')

  // Load audio last
  audio#sound(autoplay)
      source#oggSource(type="audio/ogg")
      source#mp3Source(type="audio/mp3")
