2016-04-07 19:57:06 +00:00
|
|
|
<?php
|
|
|
|
// -------------------------------------------
|
|
|
|
// kirby template FOR jannikbeyerstedt.de
|
|
|
|
|
|
|
|
// copyright: Jannik Beyerstedt | https://jannikbeyerstedt.de
|
|
|
|
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
|
|
|
// -------------------------------------------
|
|
|
|
|
2021-01-24 17:05:39 +00:00
|
|
|
$children = $page->children()->listed();
|
2016-04-07 19:57:06 +00:00
|
|
|
|
|
|
|
snippet('base/html-head');
|
|
|
|
snippet('base/cont-header');
|
|
|
|
?>
|
|
|
|
|
|
|
|
<main class="section projects">
|
|
|
|
<div class="container">
|
|
|
|
<h1><?php echo $page->title()->kirbytext(); ?></h1>
|
|
|
|
<?php echo $page->text()->kirbytext(); ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container"><div class="row">
|
|
|
|
<?php $i=0; foreach($children as $c) : $i++; ?>
|
|
|
|
<div class="col-sm-6 col-lg-3"><div class="card">
|
2016-04-22 21:35:45 +00:00
|
|
|
<a href="<?php echo $c->url(); ?>">
|
2022-08-10 13:17:42 +00:00
|
|
|
<?php if ($img = $c->exrpt_img()->toFile()) {
|
2021-01-24 17:05:39 +00:00
|
|
|
$imgurl = $img->url();
|
|
|
|
$srcset = $img->srcset([
|
|
|
|
'1x' => ['width'=>400, 'quality'=>70],
|
|
|
|
'2x' => ['width'=>800, 'quality'=>70]
|
|
|
|
]);
|
|
|
|
echo '<img src="'.$imgurl.'" class="card-img-top" srcset="'.$srcset.'" />';
|
2016-04-07 19:57:06 +00:00
|
|
|
} ?>
|
2017-08-18 23:35:03 +00:00
|
|
|
<div class="card-body">
|
2016-04-07 19:57:06 +00:00
|
|
|
<h5 class="card-title"><?php echo $c->title()->html(); ?></h5>
|
2021-01-24 17:05:39 +00:00
|
|
|
<p class="card-text"><?php echo $c->exrpt_text()->kirbytextinline(); ?></p>
|
2016-04-07 19:57:06 +00:00
|
|
|
</div>
|
2016-04-22 21:35:45 +00:00
|
|
|
</a>
|
2016-04-07 19:57:06 +00:00
|
|
|
</div></div>
|
|
|
|
<?php
|
2017-08-18 23:35:03 +00:00
|
|
|
echo ($i%2 == 0)?'<div class="clearfix d-block d-lg-none"></div>':'';
|
|
|
|
echo ($i%4 == 0)?'<div class="clearfix d-none d-lg-block"></div>':''
|
2016-04-07 19:57:06 +00:00
|
|
|
?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div></div>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<?php snippet('base/cont-footer') ?>
|
2016-10-28 21:32:29 +00:00
|
|
|
<?php snippet('base/html-end', []) ?>
|