2016-04-16 22:23:20 +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
|
|
|
|
// -------------------------------------------
|
|
|
|
|
|
|
|
$base_url = $site->find('blog')->url();
|
|
|
|
function tags($base_url, $article) {
|
|
|
|
$tags = explode(',',(string)$article->tags());
|
|
|
|
|
|
|
|
if (!empty($tags[0])) {
|
|
|
|
$return_val = '<span class="tags">';
|
|
|
|
foreach ($tags as $tag) {
|
|
|
|
$url = $base_url.'/tag:'.$tag;
|
|
|
|
$return_val .= '<a href="'.$url.'">' . $tag . '</a> ';
|
|
|
|
}
|
|
|
|
$return_val .= '</span>';
|
|
|
|
return $return_val;
|
|
|
|
} else {
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
snippet('blog-htmlhead');
|
|
|
|
snippet('base/cont-header');
|
|
|
|
?>
|
|
|
|
|
|
|
|
<main class="section blog">
|
|
|
|
<div class="container">
|
|
|
|
<article class="blogarticle">
|
|
|
|
|
|
|
|
<h1><?php echo $page->title()->html() ?></h1>
|
2016-04-17 22:26:23 +00:00
|
|
|
<div class="meta title">
|
2021-01-24 17:05:39 +00:00
|
|
|
<time datetime="<?php echo $page->date()->toDate('Y-m-d') ?>"><?php echo $page->date()->toDate('d. M. Y') ?></time>
|
2016-04-17 22:26:23 +00:00
|
|
|
</div>
|
2016-04-16 22:23:20 +00:00
|
|
|
<?php echo $page->text()->kirbytext(); ?>
|
2021-01-24 17:05:39 +00:00
|
|
|
|
2017-01-02 10:10:41 +00:00
|
|
|
<?php if ($page->en_masonry()->bool()) : echo snippet('plg/plg-masonry-sb', array('currentPage'=>$page)) ; endif;?>
|
2021-01-24 17:05:39 +00:00
|
|
|
|
2017-01-02 10:10:41 +00:00
|
|
|
<?php echo $page->text2()->kirbytext(); ?>
|
2021-01-24 17:05:39 +00:00
|
|
|
|
2016-04-17 22:26:23 +00:00
|
|
|
<div class="meta bottom">
|
2021-01-24 17:05:39 +00:00
|
|
|
<time datetime="<?php echo $page->date()->toDate('Y-m-d') ?>"><?php echo $page->date()->toDate('d. M. Y') ?></time>
|
2016-04-17 22:26:23 +00:00
|
|
|
<?php echo tags($base_url, $page); ?>
|
|
|
|
</div>
|
2016-04-16 22:23:20 +00:00
|
|
|
|
|
|
|
</article>
|
|
|
|
|
2021-01-24 17:05:39 +00:00
|
|
|
<?php if($page->hasPrevListed() || $page->hasNextListed()): ?>
|
2016-04-16 22:23:20 +00:00
|
|
|
<div class="teasers">
|
2021-01-24 17:05:39 +00:00
|
|
|
<?php if($page->hasNextListed()) {
|
|
|
|
echo snippet('blogexcerpt',["article"=>$page->nextListed(),"length"=>200,"base_url"=>$base_url]);
|
2016-04-16 22:23:20 +00:00
|
|
|
} ?>
|
2021-01-24 17:05:39 +00:00
|
|
|
<?php if($page->hasPrevListed()) {
|
|
|
|
echo snippet('blogexcerpt',["article"=>$page->prevListed(),"length"=>200,"base_url"=>$base_url]);
|
2016-04-16 22:23:20 +00:00
|
|
|
} ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<?php snippet('base/cont-footer') ?>
|
2017-01-02 10:10:41 +00:00
|
|
|
<?php snippet('base/html-end', ["plg_masonry"=>1]) ?>
|