<!DOCTYPE html>
<html>
  <head>
    <title>{{ store.name }} &mdash; {{ page.name }}</title>

    <meta charset="utf-8">
    <meta name="description" content="{{ page.meta_description }}">
    <meta name="keywords" content="{{ page.meta_keywords }}">

    <link href="{{ theme | theme_css_url }}" media="screen" rel="stylesheet" type="text/css">

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
    <script src="{{ theme | theme_js_url }}" type="text/javascript"></script>

    {{ head_content }}
  </head>

  <body id="{{ page.permalink }}" class="{{ page.category }}">
    <header>
      <a href="/" title="{{ store.name | escape }}">
        {% if theme.logo != blank %}
        <img src="{{ theme.logo.url }}" alt="{{ store.name }}">
        {% else %}
        {{ store.name }}
        {% endif %}
      </a>
    </header>

    <div class="wrap">
      <aside>
        <section>
          <a href="/cart">Cart ({{ cart.total | money_with_sign }})</a>
        </section>

        {% if theme.show_search %}
        <section>
          <form action="/products" method="get">
            <label>Search: <input type="text" name="search"></label>
          </form>
        </section>
        {% endif %}

        <nav>
          <h3>Products</h3>
          <ul class="unstyled">
            <li><a href="/products">All</a></li>
            {% for category in categories.active %}
            <li>{{ category | link_to }}</li>
            {% endfor %}
          </ul>

          {% if artists.active != blank %}
          <h3>Artists</h3>
          <ul class="unstyled">
            <li><a href="/products">All</a></li>
            {% for artist in artists.active %}
            <li>{{ artist | link_to }}</li>
            {% endfor %}
          </ul>
          {% endif %}

          <h3>Info</h3>
          <ul class="unstyled">
            {% for page in pages.all %}
            <li>{{ page | link_to }}</li>
            {% endfor %}
            <li><a href="/contact">Contact Us</a></li>
            {% if store.website != blank %}
            <li><a href="{{ store.website }}">Back to Site</a></li>
            {% endif %}
          </ul>
        </nav>

        <div>{{ powered_by_big_cartel }}</div>
      </aside>

      <section class="content">
        <h1>{{ page.name }}</h1>

        {% if errors != blank %}
        <ul class="unstyled errors">
          {% for error in errors %}
          <li>{{ error }}</li>
          {% endfor %}
        </ul>
        {% endif %}

        {% if page.category == 'custom' %}
          {{ page_content | paragraphs }}
        {% else %}
          {{ page_content }}
        {% endif %}
      </section>
    </div>

    <footer>
      {% if theme.twitter_username != blank %}
      <p><a href="http://twitter/{{ theme.twitter_username }}">Follow @{{ theme.twitter_username }}</a></p>
      {% endif %}
    </footer>
  </body>
</html>