{{#if presskit.trailers}}
<section class="block">
  <h2 id="videos">Videos</h2>

  {{#each presskit.trailers}}
  <div>
    {{#youtube}}
    <p>
      <strong>{{../name}}</strong> — <a href="https://www.youtube.com/embed/{{trim .}}?rel=0">YouTube</a> {{#if ../download}}| <a href="{{../download}}" target="_blank">Download</a>{{/if}}
    </p>

    <div class="video-player">
      <iframe class="video-player__frame" src="https://www.youtube.com/embed/{{trim .}}?rel=0" frameborder="0" allowfullscreen></iframe>
    </div>
    {{/youtube}}

    {{#vimeo}}
    <p>
      <strong>{{../name}}</strong> — <a href="https://player.vimeo.com/video/{{trim .}}">Vimeo</a> {{#if ../download}}| <a href="{{../download}}" target="_blank">Download</a>{{/if}}
    </p>

    <div class="video-player">
      <iframe class="video-player__frame" src="https://player.vimeo.com/video/{{trim .}}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
    </div>
    {{/vimeo}}

    {{#unless youtube}}
      {{#unless vimeo}}
        {{#download}}
        <p>
          <strong>{{../name}}</strong> — <a href="{{../download}}" target="_blank">Download</a>
        </p>
        {{/download}}
      {{/unless}}
    {{/unless}}
  </div>
  {{/each}}
</section>
{{/if}}

{{#if hasScreenshots}}
<section class="block">
  <h2 id="images">Images</h2>

  <div>
    <a class="button-secondary"  href="images/images.zip">
      Download as .zip
    </a>
  </div>

  <div class="gallery clearfix" id="gallery">
    {{#each images.screenshots}}
    <div class="gallery__item">
      <a href="images/{{.}}">
        <img src="{{thumbOrImage .}}" alt="{{basename .}}">
      </a>
    </div>
    {{/each}}
  </div>

  {{#each images.screenshotsWithCategory}}
  <section>
    <h3 class="capitalize" id="gallery-{{title}}">{{title}}</h3>
    <div class="gallery clearfix">
      {{#each elements}}
      <div class="gallery__item">
        <a href="images/{{.}}">
          <img src="{{thumbOrImage .}}" alt="{{basename .}}">
        </a>
      </div>
      {{/each}}
    </div>
  </section>
  {{/each}}
</section>
{{/if}}

{{#if images.logos}}
<section class="block">
  <h2 id="logo">Logo & Icon</h2>

  <div>
    <a class="button-secondary" href="images/logo.zip">
      Download as .zip
    </a>
  </div>

  {{#each images.logos}}
  <a href="images/{{.}}">
    <img src="images/{{.}}" alt="{{basename .}}" class="logo">
  </a>
  {{/each}}
</section>
{{/if}}
