2016-05-20 05:44:15 +02:00
|
|
|
<!-- Show each post on this page -->
|
2017-07-23 23:31:39 +02:00
|
|
|
<?php foreach ($pages as $Page): ?>
|
2016-05-18 04:36:23 +02:00
|
|
|
|
|
|
|
<article class="post">
|
|
|
|
|
2016-05-20 05:44:15 +02:00
|
|
|
<!-- Show plugins, Hook: Post Begin -->
|
2017-07-23 23:31:39 +02:00
|
|
|
<?php Theme::plugins('pageBegin') ?>
|
2016-05-18 04:36:23 +02:00
|
|
|
|
|
|
|
<!-- Post's header -->
|
|
|
|
<header>
|
|
|
|
<div class="title">
|
2017-07-23 23:31:39 +02:00
|
|
|
<h1><a href="<?php echo $Page->permalink() ?>"><?php echo $Page->title() ?></a></h1>
|
|
|
|
<p><?php echo $Page->description() ?></p>
|
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.
|
2017-07-23 23:31:39 +02:00
|
|
|
$User = $Page->user();
|
2016-05-20 05:44:15 +02:00
|
|
|
|
|
|
|
// 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();
|
|
|
|
}
|
|
|
|
?>
|
2017-07-23 23:31:39 +02:00
|
|
|
<time class="published" datetime="<?php echo $Page->date() ?>"><?php echo $Page->date() ?></time>
|
2016-05-20 05:44:15 +02:00
|
|
|
</div>
|
2016-05-18 04:36:23 +02:00
|
|
|
</header>
|
|
|
|
|
|
|
|
<!-- Cover Image -->
|
|
|
|
<?php
|
2017-07-23 23:31:39 +02:00
|
|
|
if($Page->coverImage()) {
|
|
|
|
echo '<a href="'.$Page->permalink().'" class="image featured"><img src="'.$Page->coverImage().'" alt="Cover Image"></a>';
|
2016-05-18 04:36:23 +02:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Post's content, the first part if has pagebrake -->
|
2017-07-23 23:31:39 +02:00
|
|
|
<?php echo $Page->content(false) ?>
|
2016-05-18 04:36:23 +02:00
|
|
|
|
|
|
|
<!-- Post's footer -->
|
|
|
|
<footer>
|
|
|
|
|
|
|
|
<!-- Read more button -->
|
2017-07-23 23:31:39 +02:00
|
|
|
<?php if($Page->readMore()) { ?>
|
2016-05-18 04:36:23 +02:00
|
|
|
<ul class="actions">
|
2017-07-23 23:31:39 +02:00
|
|
|
<li><a href="<?php echo $Page->permalink() ?>" class="button"><?php $Language->p('Read more') ?></a></li>
|
2016-05-18 04:36:23 +02:00
|
|
|
</ul>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<!-- Post's tags -->
|
|
|
|
<ul class="stats">
|
|
|
|
<?php
|
2017-07-23 23:31:39 +02:00
|
|
|
$tags = $Page->tags(true);
|
2016-05-18 04:36:23 +02:00
|
|
|
|
|
|
|
foreach($tags as $tagKey=>$tagName) {
|
|
|
|
echo '<li><a href="'.HTML_PATH_ROOT.$Url->filters('tag').'/'.$tagKey.'">'.$tagName.'</a></li>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
<!-- Plugins Post End -->
|
2017-07-23 23:31:39 +02:00
|
|
|
<?php Theme::plugins('pageEnd') ?>
|
2016-05-18 04:36:23 +02:00
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
2017-07-30 14:25:16 +02:00
|
|
|
<!-- Pagination -->
|
|
|
|
<ul class="actions pagination">
|
2017-10-19 21:26:49 +02:00
|
|
|
|
|
|
|
<!-- Show previus page link -->
|
|
|
|
<?php if(Paginator::showPrev()) { ?>
|
|
|
|
<li><a href="<?php echo Paginator::prevPageUrl() ?>" class="button big previous"><?php $Language->p('Previous Page') ?></a></li>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<!-- Show next page link -->
|
|
|
|
<?php if(Paginator::showNext()) { ?>
|
|
|
|
<li><a href="<?php echo Paginator::nextPageUrl() ?>" class="button big next"><?php $Language->p('Next Page') ?></a></li>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
</ul>
|