<div id="content">

  <!--
    Gallery title
  -->
  <header style="color: #17baef;">
    <h1><a href="{{relative gallery.home.url}}">{{gallery.title}}</a></h1>
  </header>

  <!--
    Breadcrumbs of parent albums
  -->

  <nav class="breadcrumbs">
    <div class="mask"></div>
    {{#each breadcrumbs~}}
      <a class="breadcrumb-item" href="{{relative url}}">{{title}}</a>
      <span class="separator">&gt;</span>
    {{~/each~}}
    <a class="breadcrumb-item" href="{{relative album.url}}">{{album.title}}</a>
  </nav>

  <!--
    Main gallery panel
  -->
  <section id="content">

    <!--
      Nested albums, if any
    -->
    <ul id="albums">
      {{#each album.albums~}}
      <li>
        <a href="{{relative url}}">
          <h3>{{title}}</h3>
          <div class="meta">
            <time>{{{date stats.fromDate}}} - {{{date stats.toDate}}}</time><span class="separator">,</span>
            <span class="summary">{{summary}}</span>
          </div>
          <ul class="grid clearfix">
            {{~#slice previews count=8~}}
              <li><img src="{{relative urls.thumbnail}}" /></li>
            {{~/slice}}
          </ul>
        </a>
      </li>
      {{~/each}}
    </ul>

    <!--
      All photos and videos
    -->
    <ul id="media">
      {{#each album.files}}
        {{> thumbnail}}
      {{/each}}
    </ul>

  </section>

  <!--
    Optional footer
  -->
  {{#if gallery.footer}}
  <footer>
    <p>{{{gallery.footer}}}</p>
  </footer>
  {{/if}}

</div>
