Initial commit
This commit is contained in:
commit
65e0da7e11
1397 changed files with 596542 additions and 0 deletions
51
site/templates/OLD_news.php
Normal file
51
site/templates/OLD_news.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php snippet('header') ?>
|
||||
|
||||
<?php
|
||||
// $size = [' xs', ' lg'];
|
||||
// $position = [' top', ' bottom'];
|
||||
?>
|
||||
|
||||
<!-- UPDATE - data-grid should be $gridLayoutVariable -->
|
||||
<div id="news" data-scroll="x" data-grid="[[5,5,5,5],[5,5,5,5],[5,5,5,5],[5,5,5,5]]">
|
||||
<div class="inner-scroll">
|
||||
<div class="grid">
|
||||
<?php foreach ($page->medias()->toFiles() as $image): ?>
|
||||
<?php if ($image): ?>
|
||||
<?php
|
||||
// $classes = $size[array_rand($size)];
|
||||
// $classes .= $position[array_rand($position)];
|
||||
?>
|
||||
<div class="item <?= $image->orientation() ?>" style="width:<?= $image->width() ?>px; height:<?= $image->height() ?>px">
|
||||
<?php if ($image->embedUrl()->isNotEmpty()): ?>
|
||||
<?= $image->embedUrl()->embed([
|
||||
'lazyvideo' => true,
|
||||
'thumb' => $image->width(1000)->url()
|
||||
])
|
||||
?>
|
||||
<?php else: ?>
|
||||
<?php if ($image->pageLink()->isNotEmpty() && $pageLink = page($image->pageLink()->value())): ?>
|
||||
<a href="<?= $pageLink->url() ?>" class="link-overlay"></a>
|
||||
<?php elseif ($image->externalUrl()->isNotEmpty()): ?>
|
||||
<a href="<?= $image->externalUrl() ?>" class="link-overlay"></a>
|
||||
<?php endif ?>
|
||||
<?php snippet('responsive-image', ['image' => $image]) ?>
|
||||
<div class="caption"><!--
|
||||
--><?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>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue