1
0
Fork 0

Upgrade to Kirby 3

This commit is contained in:
Jannik Beyerstedt 2021-01-24 18:05:39 +01:00
parent 80004a968c
commit 03ab30b8c1
64 changed files with 524 additions and 683 deletions

View file

@ -6,7 +6,7 @@
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
// -------------------------------------------
$children = $page->children()->visible();
$children = $page->children()->listed();
snippet('base/html-head');
snippet('base/cont-header');
@ -23,12 +23,16 @@ snippet('base/cont-header');
<div class="col-sm-6 col-lg-3"><div class="card">
<a href="<?php echo $c->url(); ?>">
<?php if ($img = $c->images()->find($c->exrpt_img())) {
echo ThumbExt($img, ['width'=>400,'quality'=>70,'class'=>"card-img-top",'inline-size'=>false]);
$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.'" />';
} ?>
<div class="card-body">
<h5 class="card-title"><?php echo $c->title()->html(); ?></h5>
<p class="card-text"><?php echo $c->exrpt_text()->kirbytext(); ?></p>
<a href="<?php echo $c->url(); ?>" class="card-link">mehr</a>
<p class="card-text"><?php echo $c->exrpt_text()->kirbytextinline(); ?></p>
</div>
</a>
</div></div>