added date and author to news in sidebar

This commit is contained in:
2026-04-24 17:08:32 +02:00
parent 5cadc5c1b4
commit 62ae9f18b0
2 changed files with 6 additions and 4 deletions

View File

@@ -217,9 +217,12 @@ $news_items = $stmt->fetchAll();
<?php else: ?>
<?php foreach ($news_items as $news): ?>
<div class="news-item">
<span class="news-date"><?= date('d.m.Y', strtotime($news['published_at'])) ?></span>
<h3><?= htmlspecialchars($news['title']) ?></h3>
<p><?= nl2br(htmlspecialchars($news['content'])) ?></p>
<span class="news-date">
<?= htmlspecialchars($news['author_name']) ?>
· <?= date('d.m.Y', strtotime($news['published_at'])) ?>
</span>
</div>
<?php endforeach; ?>
<?php endif; ?>