showreel.php 749 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Showreel: selected portfolio images, one per viewport, scroll-snap.
  4. * Images are local files in media/, shown in the order configured
  5. * in the admin backoffice.
  6. */
  7. require __DIR__ . '/app/bootstrap.php';
  8. $site = site_get();
  9. $images = $site['showreel'] ?? [];
  10. public_header('Showreel · ' . ($site['intro_title'] ?: config('site.name', '')), 'showreel', 'reel-page');
  11. if (!$images): ?>
  12. <div class="reel-empty">No images in the showreel yet.</div>
  13. <?php else:
  14. foreach ($images as $i => $file): ?>
  15. <section class="reel-slide">
  16. <img src="media/<?= e(rawurlencode($file)) ?>" alt=""
  17. <?= $i === 0 ? 'fetchpriority="high"' : 'loading="lazy"' ?>>
  18. </section>
  19. <?php endforeach;
  20. endif;
  21. public_footer();