From 4bbbe66691c1f73196ba5a8de6056e7e6b8c3227 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Fri, 22 May 2020 12:39:34 +0200 Subject: [PATCH] Only render postSeparator if appropriate --- blog.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/blog.php b/blog.php index 41c7a52..6a4017b 100644 --- a/blog.php +++ b/blog.php @@ -261,6 +261,7 @@ } $i = 0; $morePosts = 0; + $firstRendered = 0; foreach($posts as $k=>$v) { if ($v->isPublic) { if (!isset($tagSearch) || in_array($tagSearch, $v->tags)) { @@ -282,11 +283,14 @@ ' . $v->author . ' '; } else { + if ($firstRendered) { + echo '
'; + } + $firstRendered = 1; echo '
'; require $v->includeFile; renderFooter(); echo "
"; - echo '
'; } } if (($i % POSTS_PAGE_SIZE) == 0) {