added date and author to news in sidebar
This commit is contained in:
@@ -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; ?>
|
||||
|
||||
@@ -368,6 +368,7 @@ html, body {
|
||||
News Items (Sidebar Tab)
|
||||
----------------------------------------------------------------- */
|
||||
.news-item {
|
||||
font-size: 0.8rem;
|
||||
padding: var(--space-md);
|
||||
margin-bottom: var(--space-sm);
|
||||
background: var(--color-surface);
|
||||
@@ -376,10 +377,8 @@ html, body {
|
||||
}
|
||||
|
||||
.news-date {
|
||||
font-size: 0.75rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--color-text-secondary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.news-item h3 {
|
||||
|
||||
Reference in New Issue
Block a user