35 lines
1.5 KiB
PHP
35 lines
1.5 KiB
PHP
|
|
<?php snippet('header') ?>
|
||
|
|
|
||
|
|
<?php
|
||
|
|
// $size = [' xs', ' lg'];
|
||
|
|
// $position = [' top', ' bottom'];
|
||
|
|
?>
|
||
|
|
|
||
|
|
<!-- UPDATE - data-grid should be $gridLayoutVariable -->
|
||
|
|
<div id="news">
|
||
|
|
<?php foreach ($page->medias()->toFiles() as $image): ?>
|
||
|
|
<?php if ($image): ?>
|
||
|
|
<?php
|
||
|
|
$displayWidth = $image->displayWidth()->isNotEmpty() ? $image->displayWidth() : 50;
|
||
|
|
?>
|
||
|
|
<div class="item" style="width: <?= $displayWidth ?>vw">
|
||
|
|
<?php if ($image->pageLink()->isNotEmpty() && $pageLink = page($image->pageLink()->value())): ?>
|
||
|
|
<a href="<?= $pageLink->url() ?>" class="link-overlay" style="width: <?= $displayWidth ?>vw"></a>
|
||
|
|
<?php elseif ($image->stream()->isNotEmpty()): ?>
|
||
|
|
<a href="<?= $image->stream() ?>" class="link-overlay" style="width: <?= $displayWidth ?>vw"></a>
|
||
|
|
<?php endif ?>
|
||
|
|
<?php snippet('responsive-image', ['image' => $image]) ?>
|
||
|
|
<div class="caption" style="width: <?= $displayWidth ?>vw"><!----><?php if ($image->subtitle()->isNotEmpty()): ?>
|
||
|
|
<div class="subtitle uppercase"><?= $image->subtitle()->html() ?></div>
|
||
|
|
<?php endif ?><!----><?php if ($image->date()): ?>
|
||
|
|
<div class="date uppercase"><?= $image->date('d.m.Y') ?></div>
|
||
|
|
<?php endif ?><!----><?php if ($image->caption()->isNotEmpty()): ?>
|
||
|
|
<div class="text"><?= $image->caption()->kt() ?></div>
|
||
|
|
<?php endif ?><!----></div>
|
||
|
|
</div>
|
||
|
|
<?php endif ?>
|
||
|
|
<?php endforeach ?>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<?php snippet('footer') ?>
|