<!doctype html>
<html>
  <head>
    {% include "snippets/site-header.html" %}
  </head>
  <body>

    <div class="container ds-header-container">
      <div class="page-header" data-ds-hide="display">
        <div class="row">
          <div class="col-md-9">
            <!--
            <a href="/"><i class="icon-home icon-large"></i></a>
            <a href="/dashboards"><i class="icon-dashboard icon-large"></i></a>
            -->
            <br/>
            <h1 class="page-title">
              {% block pagetitle %}
              {% endblock %}
            </h1>
          </div>
          <div class="col-md-3" align="right">
            <div class="ds-time-container" align="right">
              <h2><span class="time"></span><small class="ampm"></small></h2>
              <h6 class="date"></h6>
            </div>
            <a href="/"><i class="fa fa-lg fa-home"></i></a>
            <a href="/dashboards"><i class="fa fa-lg fa-bar-chart-o"></i></a>
            <a href="/preferences"><i class="fa fa-lg fa-cog"></i></a>
          </div>
        </div>
      </div> <!-- page-header -->
    </div><!-- container -->

      {% block layout %}
      {% block content %}
      {% endblock %}
      {% endblock %}

      {% block layoutfooter %}
      {% block footer %}
      {% endblock %}
      {% endblock %}

    <div class="container ds-footer-container">
      {% include "snippets/site-footer.html" %}
    </div>

    <script>
     function ds_display_time() {
       var now = moment()
       $('.ds-time-container .time').text(now.tz(ds.config.DISPLAY_TIMEZONE).format('hh:mm'))
       $('.ds-time-container .ampm').text(now.tz(ds.config.DISPLAY_TIMEZONE).format('A z'))
       $('.ds-time-container .date').text(now.tz(ds.config.DISPLAY_TIMEZONE).format('dddd D MMMM YYYY'))
     }

     ds_display_time()

     ds.manager.onDashboardLoaded(function() {
       ds_display_time()
     })
    </script>

  </body>
</html>
