<!DOCTYPE html>
<html lang="en">
  {% set facet='view' %}
  <head>
    <title>
      {% if recipe.name %}
      {{ recipe.name }} @ HXL Proxy
      {% else %}
      View data @ HXL Proxy
      {% endif %}
    </title>
    {% include "includes/headers.html" %}
  </head>
  <body class="container-fluid">
    {% include "includes/navbar.html" %}
    <header class="row">
      {% include "includes/data-tabs.html" %}
      <h1 class="col-xs-6 col-sm-8 col-md-10">
        {% if recipe.name %}
        {{ recipe.name }}
        {% else %}
        View Data
        {% endif %}
      </h1>
      <p class="col-xs-6 col-sm-4 col-md-2 small">
        <span class="icons small pull-right">
          <a href="{{ data_url(recipe, format='csv') }}">
            <img src="{{ static('images/csv-icon.png') }}" alt="Download as CSV spreadsheet" />
            <span>CSV</span>
          </a>
          <a href="{{ data_url(recipe, format='json') }}">
            <img src="{{ static('images/json-icon.png') }}" alt="Download as JSON data" />
            <span>JSON</span>
          </a>
        </span>
      </p>
    </header>
    <main class="row">
      <div id="metadata" class="col-xs-12">
        {% include "includes/source.html" %}
        {% if recipe.description %}
        <p>{{ recipe.description }}</p>
        {% endif %}
      </div>
      <section id="data" class="col-xs-12">
        {% include 'includes/hxltable.html' %}
      </section>
    </main>
    {% include "includes/scripts.html" %}
  </body>
</html>
