2016-05-18 04:36:23 +02:00
|
|
|
<article class="post">
|
|
|
|
|
2016-05-20 05:44:15 +02:00
|
|
|
<!-- Show plugins, Hook: Post Begin -->
|
2016-05-18 04:36:23 +02:00
|
|
|
<?php Theme::plugins('postBegin') ?>
|
|
|
|
|
2016-05-20 05:44:15 +02:00
|
|
|
<!-- Post's header -->
|
2016-05-18 04:36:23 +02:00
|
|
|
<header>
|
|
|
|
<div class="title">
|
2016-05-20 05:44:15 +02:00
|
|
|
<h1><a href="<?php echo $Post->permalink() ?>"><?php echo $Post->title() ?></a></h1>
|
2016-05-18 04:36:23 +02:00
|
|
|
</div>
|
2016-05-20 05:44:15 +02:00
|
|
|
<div class="meta">
|
|
|
|
<?php
|
|
|
|
// Get the user who created the post.
|
|
|
|
$User = $Post->user();
|
|
|
|
|
|
|
|
// Default author is the username.
|
|
|
|
$author = $User->username();
|
|
|
|
|
|
|
|
// If the user complete the first name or last name this will be the author.
|
|
|
|
if( Text::isNotEmpty($User->firstName()) || Text::isNotEmpty($User->lastName()) ) {
|
|
|
|
$author = $User->firstName().' '.$User->lastName();
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<time class="published" datetime="2015-11-01"><?php echo $Post->date() ?></time>
|
|
|
|
<div class="author"><span class="name"><?php echo $author ?></span><img src="<?php echo $User->profilePicture() ?>" alt=""></div>
|
|
|
|
</div>
|
2016-05-18 04:36:23 +02:00
|
|
|
</header>
|
|
|
|
|
|
|
|
<!-- Cover Image -->
|
|
|
|
<?php
|
|
|
|
if($Post->coverImage()) {
|
|
|
|
echo '<a href="'.$Post->permalink().'" class="image featured"><img src="'.$Post->coverImage().'" alt="Cover Image"></a>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Post's content, the first part if has pagebrake -->
|
|
|
|
<?php echo $Post->content() ?>
|
|
|
|
|
|
|
|
<!-- Post's footer -->
|
|
|
|
<footer>
|
|
|
|
|
|
|
|
<!-- Post's tags -->
|
|
|
|
<ul class="stats">
|
|
|
|
<?php
|
|
|
|
$tags = $Post->tags(true);
|
|
|
|
|
|
|
|
foreach($tags as $tagKey=>$tagName) {
|
|
|
|
echo '<li><a href="'.HTML_PATH_ROOT.$Url->filters('tag').'/'.$tagKey.'">'.$tagName.'</a></li>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</footer>
|
|
|
|
|
2016-05-20 05:44:15 +02:00
|
|
|
<!-- Show plugins, Hook: Post End -->
|
2016-05-18 04:36:23 +02:00
|
|
|
<?php Theme::plugins('postEnd') ?>
|
|
|
|
|
|
|
|
</article>
|