<!DOCTYPE html>
<html>
<head>
  <title>{% block title %}Binder (beta){% endblock %}</title>
  {% block head %}
  <link id="favicon" rel="shortcut icon" type="image/png" href="{{static_url("favicon.ico")}}" />
  <link href="{{static_url("dist/styles.css")}}" rel="stylesheet"></link>

  {% endblock head %}
</head>
<body>
  {% block body %}

  {% block logo %}
  <div class="container">
    <div class="row">
      <div id="logo-container">
        <img id="logo" src={% block logo_image %}"{{static_url("logo.svg")}}"{% endblock logo_image %} width="390px"  />
      </div>
    </div>
  </div>
  {% endblock logo %}

  {% block main %}
  {% endblock main %}

  {% block footer %}
  <div class="container">
    <div class="row text-center">
      <h3>questions?<br />join the <a href="https://gitter.im/jupyterhub/binder">chat</a>, read the <a href="https://mybinder.readthedocs.io/en/latest/">docs</a>, see the <a href="https://github.com/jupyterhub/binderhub">code</a></h3>
    </div>
  </div>
  {% endblock footer %}

  {% if google_analytics_code %}
  <script>
    // Only load GA if DNT is not set
    if (navigator.doNotTrack != "1" && // Most Firefox & Chrome
      window.doNotTrack != "1" && // IE & Safari
      navigator.msDoNotTrack != "1" // Old IE
  ) {
    console.log("Loading Google Analytics, since Do Not Track is off");
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

    ga('create', '{{ google_analytics_code }}', '{{ google_analytics_domain }}',
      {'storage': 'none'});
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
  }
  </script>
  {% endif %}
  {% if extra_footer_scripts %}
  {% for script in extra_footer_scripts|dictsort %}
  <script>
    {{ script[1]|safe }}
  </script>
  {% endfor %}
  {% endif %}
  {% endblock body %}
</body>
</html>
