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:
Théophile Gervreau-Mercier
2026-02-12 12:26:32 +01:00
parent 942a93a3ad
commit 9511bb93b5
5 changed files with 121 additions and 14 deletions

View File

@@ -13,7 +13,8 @@ main {
height: 60vh;
}
footer {
height: 20vh;
height: 10vh;
font-size: 0.8em;
}
body {
@@ -51,6 +52,33 @@ header .title, header section, header nav {
text-decoration: none;
line-height: 2.5rem;
}
/* Filter info banner */
.filter-info {
background: rgba(149, 87, 181, 0.9);
color: white;
padding: 0.5rem 1rem;
text-align: center;
font-size: 0.9rem;
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
}
.clear-filter {
color: white;
text-decoration: none;
padding: 0.25rem 0.75rem;
background: rgba(0, 0, 0, 0.2);
border-radius: 15px;
font-size: 0.85rem;
transition: background 0.2s;
}
.clear-filter:hover {
background: rgba(0, 0, 0, 0.4);
}
main {
height: 60vh;
@@ -80,6 +108,57 @@ main {
footer {
background: #222222ff;
overflow: hidden;
}
/* Years navigation in footer */
.years-nav {
height: 100%;
display: flex;
align-items: center;
}
.years-scroll {
display: flex;
gap: 1rem;
overflow-x: auto;
overflow-y: hidden;
scroll-behavior: smooth;
padding: 0.5rem 0;
width: 100%;
}
/* Hide scrollbar but keep functionality */
.years-scroll::-webkit-scrollbar {
height: 4px;
}
.years-scroll::-webkit-scrollbar-track {
background: transparent;
}
.years-scroll::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 2px;
}
.year-link {
color: white;
text-decoration: none;
padding: 0.5rem 1rem;
border-radius: 20px;
white-space: nowrap;
transition: background 0.2s;
font-size: 1rem;
}
.year-link:hover {
background: rgba(255, 255, 255, 0.1);
}
.year-link.active {
background: #9557b5ff;
font-weight: bold;
}
/* .card { */