Only render postSeparator if appropriate
This commit is contained in:
parent
688c645ac4
commit
4bbbe66691
6
blog.php
6
blog.php
@ -261,6 +261,7 @@
|
|||||||
}
|
}
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$morePosts = 0;
|
$morePosts = 0;
|
||||||
|
$firstRendered = 0;
|
||||||
foreach($posts as $k=>$v) {
|
foreach($posts as $k=>$v) {
|
||||||
if ($v->isPublic) {
|
if ($v->isPublic) {
|
||||||
if (!isset($tagSearch) || in_array($tagSearch, $v->tags)) {
|
if (!isset($tagSearch) || in_array($tagSearch, $v->tags)) {
|
||||||
@ -282,11 +283,14 @@
|
|||||||
<dc:creator>' . $v->author . '</dc:creator>
|
<dc:creator>' . $v->author . '</dc:creator>
|
||||||
</item>';
|
</item>';
|
||||||
} else {
|
} else {
|
||||||
|
if ($firstRendered) {
|
||||||
|
echo '<hr class="postSeparator">';
|
||||||
|
}
|
||||||
|
$firstRendered = 1;
|
||||||
echo '<div class="post">';
|
echo '<div class="post">';
|
||||||
require $v->includeFile;
|
require $v->includeFile;
|
||||||
renderFooter();
|
renderFooter();
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
echo '<hr class="postSeparator">';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (($i % POSTS_PAGE_SIZE) == 0) {
|
if (($i % POSTS_PAGE_SIZE) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user