<?php $this->extend('block_searchable'); ?>

<?php $this->block('content'); ?>

  <ul class="row justify-content-center">
    <?php foreach ($this->files as $file): ?>
      <li class="col-6 col-md-4 col-lg-3 col-xl-2 download-element ext-<?= $file['extension'] ?>">
        <?php if ($file['previews']): ?>
          <?php foreach ($file['previews'] as $preview): ?>
            <?php $this->insert('image', $preview->getLegacyTemplateData()) ?>
          <?php endforeach ?>
        <?php endif ?>
        <a href="<?= $file['href'] ?>" title="<?= $file['title'] ?>" type="<?= $file['mime'] ?>">
            <span><?= substr($file['link'], 0 , (strrpos($file['link'], "."))); ?> <span class="size">(<?= $file['filesize'] ?>)</span></span>
        </a>
      </li>
    <?php endforeach; ?>
  </ul>

<?php $this->endblock(); ?>