home > slideshow : enable
All checks were successful
Deploy / Deploy to Production (push) Successful in 3s
All checks were successful
Deploy / Deploy to Production (push) Successful in 3s
This commit is contained in:
parent
dc0c48acc3
commit
13040a9df3
8 changed files with 163 additions and 48 deletions
|
|
@ -1,12 +1,23 @@
|
|||
<?php snippet('header') ?>
|
||||
|
||||
<div id="home-slideshow">
|
||||
<?php foreach ($site->images() as $image): ?>
|
||||
<img src="<?= $image->url() ?>">
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($site->files()->sortBy('sort') as $file): ?>
|
||||
<?php if ($file->type() === 'video'): ?>
|
||||
<video autoplay muted loop playsinline data-id="<?= $file->uuid() ?>">
|
||||
<source src="<?= $file->url() ?>" type="<?= $file->mime() ?>">
|
||||
</video>
|
||||
<?php else: ?>
|
||||
<?php snippet('picture', [
|
||||
'file' => $file,
|
||||
'srcsetName' => 'home-slideshow',
|
||||
'sizes' => '100vw',
|
||||
'lazy' => false,
|
||||
]) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<button class="prev"></button>
|
||||
<button class="next"></button>
|
||||
<div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php snippet('footer') ?>
|
||||
<script src="/assets/js/home-slideshow.js"></script>
|
||||
<?php snippet('footer') ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue