bludit/bl-themes/log/php/home.php

71 lines
1.8 KiB
PHP
Raw Normal View History

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): ?>
<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') ?>
<!-- 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>
</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>
</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>';
}
?>
<!-- Post's content, the first part if has pagebrake -->
2017-07-23 23:31:39 +02:00
<?php echo $Page->content(false) ?>
<!-- Post's footer -->
<footer>
<!-- Read more button -->
2017-07-23 23:31:39 +02:00
<?php if($Page->readMore()) { ?>
<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>
</ul>
<?php } ?>
<!-- Post's tags -->
<ul class="stats">
<?php
2017-07-23 23:31:39 +02:00
$tags = $Page->tags(true);
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') ?>
</article>
<?php endforeach; ?>