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">
|
|
|
|
<time datetime="<?php echo $page->date('Y-m-d') ?>"><?php echo $page->date('d. M. Y') ?></time>
|
|
|
|
</div>
|
2016-04-16 22:23:20 +00:00
|
|
|
<?php echo $page->text()->kirbytext(); ?>
|
2016-04-17 22:26:23 +00:00
|
|
|
|
|
|
|
<div class="meta bottom">
|
|
|
|
<time datetime="<?php echo $page->date('Y-m-d') ?>"><?php echo $page->date('d. M. Y') ?></time>
|
|
|
|
<?php echo tags($base_url, $page); ?>
|
|
|
|
</div>
|
2016-04-16 22:23:20 +00:00
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
<?php if($page->hasPrevVisible() || $page->hasNextVisible()): ?>
|
|
|
|
<div class="teasers">
|
|
|
|
<?php if($page->hasNextVisible()) {
|
|
|
|
echo snippet('blogexcerpt',["article"=>$page->nextVisible(),"length"=>200,"base_url"=>$base_url]);
|
|
|
|
} ?>
|
|
|
|
<?php if($page->hasPrevVisible()) {
|
|
|
|
echo snippet('blogexcerpt',["article"=>$page->prevVisible(),"length"=>200,"base_url"=>$base_url]);
|
|
|
|
} ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<?php snippet('base/cont-footer') ?>
|
|
|
|
<?php snippet('base/html-end', ["bs_util"=>1,
|
|
|
|
"bs_collapse"=>1]) ?>
|