feat: extend news section with tag filtering, improved layout, and homepage integration
Added tag filtering functionality to the blog and news sections, allowing users to filter posts by categories. Enhanced layout with improved tag display, author details, and responsive styling. Integrated the latest news preview into the homepage template. Adjusted visibility logic for navigation arrows in event carousel and refined related PHP snippets for better clarity and reusability.
This commit is contained in:
+13
-3
@@ -23,12 +23,23 @@
|
||||
|
||||
|
||||
<?php snippet('layout', slots: true) ?>
|
||||
<p><?= $page->date()->toDate("d.m.Y") ?> - <?= $page->subheadline() ?></p>
|
||||
<div class="text-right pb-2">
|
||||
<?php foreach($page->tags()->split() as $tag): ?>
|
||||
<a href="<?= page('news')->url(['params' => ['tag' => $tag]]) ?>" class="relative z-10 rounded-full bg-gray-50 px-3 py-1.5 font-medium text-gray-600 hover:bg-gray-100"><?= $tag ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<?= $page->date()->toDate("d.m.Y") ?>
|
||||
<?php if ($page->subheadline()->isNotEmpty()): ?>
|
||||
- <?= $page->subheadline() ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
|
||||
<h1><?= $page->headline() ?></h1>
|
||||
|
||||
<div>
|
||||
<img src="<?= $page->image()->url() ?>" alt="">
|
||||
<img class="w-full rounded-xl object-cover" src="<?= $page->image()->url() ?>" alt="">
|
||||
</div>
|
||||
|
||||
<div class="blockpage">
|
||||
@@ -53,5 +64,4 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php endsnippet() ?>
|
||||
Reference in New Issue
Block a user