<header>
  <a href="{{relative gallery.home.url}}">
    <h1>{{gallery.title}}</h1>
    <h2>{{gallery.subtitle}}</h2>
  </a>
</header>

{{#compare album.depth '!=' 0}}
  <nav>
    {{#each gallery.home.albums}}
      {{> nav}}
    {{/each}}
  </nav>
{{/compare}}

<ul id="galleries">
 {{#each album.albums}}
 <li>
   <a href="{{relative url}}">
     <h3>{{title}}</h3>
     <div class="meta">
       {{summary}}<br />
       {{{date stats.fromDate}}} - {{{date stats.toDate}}}
     </div>
     <ul class="grid">
       {{~#slice previews count=4~}}
       <li><img src="{{relative urls.thumbnail}}" /></li>
       {{~/slice}}
     </ul>
   </a>
 </li>
 {{/each}}
</ul>

<ul id="media">
  {{#each album.files}}
    {{> thumbnail}}
  {{/each}}
</ul>

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