bludit/themes/pure/php/home.php

59 lines
1.6 KiB
PHP
Raw Normal View History

2015-07-20 00:14:12 -03:00
<h1 class="subhead"><?php echo $Language->get('Recent posts') ?></h1>
2015-03-08 14:02:59 -03:00
<?php foreach ($posts as $Post): ?>
<section class="post">
2015-07-07 01:24:51 -03:00
2015-08-06 23:13:55 -03:00
<!-- Plugins Post Begin -->
<?php Theme::plugins('postBegin') ?>
2015-07-07 01:24:51 -03:00
<!-- Post header -->
2015-03-08 14:02:59 -03:00
<header class="post-header">
2015-07-07 01:24:51 -03:00
<!-- Post title -->
2015-03-08 14:02:59 -03:00
<h2 class="post-title">
2015-07-07 01:24:51 -03:00
<a href="<?php echo $Post->permalink() ?>"><?php echo $Post->title() ?></a>
2015-03-08 14:02:59 -03:00
</h2>
2015-07-07 01:24:51 -03:00
<!-- Post date and author -->
<div class="post-meta">
2015-08-26 00:42:32 -03:00
<span class="date"><?php echo $Post->date() ?></span>
2015-07-07 01:24:51 -03:00
<span class="author">
<?php
echo $Language->get('Posted By').' ';
if( Text::isNotEmpty($Post->authorFirstName()) && Text::isNotEmpty($Post->authorLastName()) ) {
2015-11-11 18:13:32 -03:00
echo $Post->authorFirstName().' '.$Post->authorLastName();
2015-07-07 01:24:51 -03:00
}
else {
echo $Post->username();
}
?>
</span>
</div>
2015-03-08 14:02:59 -03:00
</header>
2015-07-07 01:24:51 -03:00
<!-- Post content -->
<div class="post-content">
2015-07-25 21:25:13 -03:00
<?php
2015-08-06 19:56:52 -03:00
// Call the method with FALSE to get the first part of the post
2015-07-25 21:25:13 -03:00
echo $Post->content(false)
?>
2015-03-08 14:02:59 -03:00
</div>
2015-07-07 01:24:51 -03:00
2015-07-25 21:25:13 -03:00
<?php if($Post->readMore()) { ?>
2015-07-24 00:28:25 -03:00
<a class="read-more" href="<?php echo $Post->permalink() ?>"><?php $Language->printMe('Read more') ?></a>
2015-07-25 21:25:13 -03:00
<?php } ?>
2015-07-24 00:28:25 -03:00
2015-08-06 23:13:55 -03:00
<!-- Plugins Post End -->
<?php Theme::plugins('postEnd') ?>
2015-03-08 14:02:59 -03:00
</section>
2015-07-20 00:14:12 -03:00
<?php endforeach; ?>
2015-08-06 19:56:52 -03:00
<!-- Paginator for posts -->
2015-07-20 00:14:12 -03:00
<?php
echo Paginator::html();
?>