Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
fiktivkod/application/modules/blog/views/scripts/index/latest.phtml
2014-12-28 18:44:00 +01:00

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; ?>