Initial commit

This commit is contained in:
sarahgarcin1 2026-01-05 19:33:15 +01:00
commit 388079e6bb
1108 changed files with 330121 additions and 0 deletions

View file

@ -0,0 +1,30 @@
<?php
use Kirby\Cms\Html;
/** @var \Kirby\Cms\Block $block */
$caption = $block->caption();
$url = null;
$class = null;
if ($block->location() == 'web') {
$url = $block->url()->esc();
$class = "video-from-web";
} elseif ($video = $block->video()->toFile()) {
$url = $video->url();
$class = "video-from-local";
}
?>
<?php if ($video = Html::video($url)): ?>
<figure class="<?= $class ?>">
<?php if ($block->location() == 'web'):?>
<?= $video ?>
<?php else:?>
<video src="<?= $url ?>" controls></video>
<?php endif;?>
<?php if ($caption->isNotEmpty()): ?>
<figcaption><?= $caption ?></figcaption>
<?php endif ?>
</figure>
<?php endif ?>