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

@ -23,7 +23,7 @@ function tags($base_url, $article) {
}
}
$articles = $page->children()->visible()->flip();
$articles = $page->children()->listed()->flip();
$title = $page->title()->html();

View file

@ -33,28 +33,28 @@ snippet('base/cont-header');
<h1><?php echo $page->title()->html() ?></h1>
<div class="meta title">
<time datetime="<?php echo $page->date('Y-m-d') ?>"><?php echo $page->date('d. M. Y') ?></time>
<time datetime="<?php echo $page->date()->toDate('Y-m-d') ?>"><?php echo $page->date()->toDate('d. M. Y') ?></time>
</div>
<?php echo $page->text()->kirbytext(); ?>
<?php if ($page->en_masonry()->bool()) : echo snippet('plg/plg-masonry-sb', array('currentPage'=>$page)) ; endif;?>
<?php echo $page->text2()->kirbytext(); ?>
<div class="meta bottom">
<time datetime="<?php echo $page->date('Y-m-d') ?>"><?php echo $page->date('d. M. Y') ?></time>
<time datetime="<?php echo $page->date()->toDate('Y-m-d') ?>"><?php echo $page->date()->toDate('d. M. Y') ?></time>
<?php echo tags($base_url, $page); ?>
</div>
</article>
<?php if($page->hasPrevVisible() || $page->hasNextVisible()): ?>
<?php if($page->hasPrevListed() || $page->hasNextListed()): ?>
<div class="teasers">
<?php if($page->hasNextVisible()) {
echo snippet('blogexcerpt',["article"=>$page->nextVisible(),"length"=>200,"base_url"=>$base_url]);
<?php if($page->hasNextListed()) {
echo snippet('blogexcerpt',["article"=>$page->nextListed(),"length"=>200,"base_url"=>$base_url]);
} ?>
<?php if($page->hasPrevVisible()) {
echo snippet('blogexcerpt',["article"=>$page->prevVisible(),"length"=>200,"base_url"=>$base_url]);
<?php if($page->hasPrevListed()) {
echo snippet('blogexcerpt',["article"=>$page->prevListed(),"length"=>200,"base_url"=>$base_url]);
} ?>
</div>
<?php endif ?>

View file

@ -12,11 +12,11 @@ snippet('base/cont-header');
<main class="section">
<div class="container">
<h1><?php echo $page->title()->html() ?></h1>
<?php echo $page->text()->kirbytext(); ?>
</div>
</main>

View file

@ -12,7 +12,7 @@ snippet('base/cont-header');
<main class="section">
<div class="container">
<div class="home">
<div class="logo">
<span class="firstname">jannik</span>0b 01101010<br>
@ -25,11 +25,11 @@ snippet('base/cont-header');
01110100 01100101<br>
01100100 01110100
</div>
<p><?php echo $page->subtitle()->kirbytextRaw() ?></p>
<p><?php echo $page->subtitle()->kirbytextinline() ?></p>
</div>
<?php echo $page->text()->kirbytext(); ?>
</div>
</main>

View file

@ -11,16 +11,16 @@ snippet('base/cont-header');
?>
<main class="section photo">
<?php echo snippet('plg-carousel', array('currentPage'=>$page,
'preNormal'=>'',
'preAlt'=>'')); ?>
<?php echo snippet('plg/plg-carousel', array('currentPage'=>$page,
'preNormal'=>'',
'preAlt'=>'')); ?>
<div class="container">
<?php echo $page->text()->kirbytext(); ?>
</div>
<?php echo snippet('plg/plg-masonry-sb', array('currentPage'=>$page)) ; ?>
<div class="container">
<?php echo $page->text2()->kirbytext(); ?>
</div>

View file

@ -16,8 +16,8 @@ snippet('base/cont-header');
<?php echo $page->text()->kirbytext(); ?>
</div>
<?php if($page->en_masonry() == '1') echo snippet('plg/plg-masonry-sb', array('currentPage'=>$page)); ?>
<?php if($page->en_masonry()->bool()) echo snippet('plg/plg-masonry-sb', array('currentPage'=>$page)); ?>
<div class="container">
<?php echo $page->text2()->kirbytext(); ?>
</div>

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>

View file

@ -18,11 +18,16 @@ snippet('base/cont-header');
<div class="row featurette">
<div class="col-sm-9 col-12">
<h2 class="featurette-heading"><?php echo $page->featurette_headline()->html() ?></h2>
<p class="lead"><?php echo $page->featurette_text()->kirbytextRaw() ?></p>
<p class="lead"><?php echo $page->featurette_text()->kirbytextinline() ?></p>
</div>
<div class="col-sm-3 col-12">
<?php if ($img = $page->images()->find($page->featurette_img())) {
echo ThumbExt($img, ['width'=>235,'quality'=>70,'class'=>"img-fluid rounded",'alt'=>"Portrait",'inline-size'=>false]);
$imgurl = $img->url();
$srcset = $img->srcset([
'1x' => ['width'=>235, 'quality'=>70],
'2x' => ['width'=>235*2, 'quality'=>70]
]);
echo '<img src="'.$imgurl.'" class="img-fluid rounded" alt="Portrait" srcset="'.$srcset.'" />';
}?>
</div>
</div>