mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
feat: add year filter to main index
- Footer now displays all available years horizontally with scroll
- Click on year filters thesis list to that year
- Active year highlighted in footer
- 'Tous' link to reset filter
- Filter info banner shows when year selected with reset button
- Pagination preserves year filter
- Styled with horizontal scroll, smooth scrollbar
- Tests passing ✅
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
<!-- footer.php -->
|
||||
<footer>
|
||||
<div>
|
||||
<button>Année</button>
|
||||
</div>
|
||||
<div>
|
||||
<button>Cursus</button>
|
||||
</div>
|
||||
<nav class="years-nav">
|
||||
<div class="years-scroll">
|
||||
<?php if (!empty($availableYears)): ?>
|
||||
<a href="index.php" class="year-link <?= !isset($year) ? 'active' : '' ?>">Tous</a>
|
||||
<?php foreach ($availableYears as $y): ?>
|
||||
<a href="index.php?year=<?= (int)$y ?>" class="year-link <?= isset($year) && $year == $y ? 'active' : '' ?>">
|
||||
<?= htmlspecialchars($y) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</nav>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user