36 lines
No EOL
1.1 KiB
PHTML
36 lines
No EOL
1.1 KiB
PHTML
<h1><?=$this->translate('u:blog') ?></h1>
|
|
|
|
<p><?=$this->translate('BLOG_LATEST_INTRO') ?></p>
|
|
|
|
<?php
|
|
$hl = new Fiktiv_Highlighter();
|
|
$hl->setHighlighter('geshi');
|
|
?>
|
|
|
|
|
|
<?php foreach($this->posts as $post) : ?>
|
|
<div class="blogpost">
|
|
<h3><a href="<?=$this->url(array('action' => 'read', 'permlink' => $post->permlink),'blog-default') ?>"><?=$post->title ?></a></h3>
|
|
<p class="publish"><?=$post->getPubDate()->toString('yyyy-MM-dd').' '.$this->translate('TIME_AT').' '.$post->getPubDate()->toString('HH:mm').' '.$post->getAuthor()->firstName ?></p>
|
|
<div class="content">
|
|
<?= $hl->replaceCodeblock($post->content) ?>
|
|
</div>
|
|
|
|
<?php if ($post->hasTags()): ?>
|
|
|
|
<div class="tags">
|
|
<?php
|
|
$count = $post->getTags()->count();
|
|
foreach ($post->getTags() as $tag) {
|
|
|
|
echo '<a href="'.$this->url(array('controller' => 'archive', 'action' => 'filter', 'tag' => $tag->name), 'blog').'">'.$tag->name.'</a>';
|
|
|
|
echo (--$count > 0) ? ', ' : '';
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
<?php endforeach; ?> |