added date and author to news in sidebar
This commit is contained in:
@@ -217,9 +217,12 @@ $news_items = $stmt->fetchAll();
|
|||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?php foreach ($news_items as $news): ?>
|
<?php foreach ($news_items as $news): ?>
|
||||||
<div class="news-item">
|
<div class="news-item">
|
||||||
<span class="news-date"><?= date('d.m.Y', strtotime($news['published_at'])) ?></span>
|
|
||||||
<h3><?= htmlspecialchars($news['title']) ?></h3>
|
<h3><?= htmlspecialchars($news['title']) ?></h3>
|
||||||
<p><?= nl2br(htmlspecialchars($news['content'])) ?></p>
|
<p><?= nl2br(htmlspecialchars($news['content'])) ?></p>
|
||||||
|
<span class="news-date">
|
||||||
|
<?= htmlspecialchars($news['author_name']) ?>
|
||||||
|
· <?= date('d.m.Y', strtotime($news['published_at'])) ?>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -368,6 +368,7 @@ html, body {
|
|||||||
News Items (Sidebar Tab)
|
News Items (Sidebar Tab)
|
||||||
----------------------------------------------------------------- */
|
----------------------------------------------------------------- */
|
||||||
.news-item {
|
.news-item {
|
||||||
|
font-size: 0.8rem;
|
||||||
padding: var(--space-md);
|
padding: var(--space-md);
|
||||||
margin-bottom: var(--space-sm);
|
margin-bottom: var(--space-sm);
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
@@ -376,10 +377,8 @@ html, body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.news-date {
|
.news-date {
|
||||||
font-size: 0.75rem;
|
font-size: 0.8rem;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.news-item h3 {
|
.news-item h3 {
|
||||||
|
|||||||
Reference in New Issue
Block a user