remove gitlab ci, add forgejo ci
Some checks failed
Deploy / Deploy to Production (push) Failing after 6s
Some checks failed
Deploy / Deploy to Production (push) Failing after 6s
This commit is contained in:
parent
778265feab
commit
ac2ccf01e2
7 changed files with 128 additions and 38 deletions
33
site/snippets/picture.php
Normal file
33
site/snippets/picture.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php if (isset($file)): ?>
|
||||
<?php
|
||||
$sizes = isset($size) ? '(min-width: 1085px) ' . $size . 'vw, 100vw' : '(min-width: 1085px) 50vw, 100vw';
|
||||
$alt = $file->alt() ?? '';
|
||||
$crop = $crop ?? false;
|
||||
|
||||
$webPSrcset = $file->srcset('webp');
|
||||
$srcset = $file->srcset();
|
||||
$src = $file->url();
|
||||
$width = $file->resize(1800)->width();
|
||||
$height = $file->resize(1800)->height();
|
||||
$class = isset($class) ? 'class="' . $class . '"': '';
|
||||
$lazy = $lazy ?? true;
|
||||
$span = isset($span) ? 'style="--span: ' . $span . ';"': '';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<picture <?= $class ?> <?= $span ?> data-id="<?= $file->uuid() ?>" orientation="<?= $file->orientation() ?>">
|
||||
|
||||
<source srcset="<?= $webPSrcset ?>"
|
||||
sizes="<?= $sizes ?>" type="image/webp">
|
||||
<img
|
||||
src="<?= $src ?>"
|
||||
srcset="<?= $srcset ?>"
|
||||
sizes="<?= $sizes ?>"
|
||||
width="<?= $width ?>"
|
||||
height="<?= $height ?>"
|
||||
alt="<?= $alt?>"
|
||||
>
|
||||
<div class="loader"></div>
|
||||
</picture>
|
||||
<?php endif ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue