Add numbered pagination and redesign the IT/EN language switch

Blog and category archives now show a numbered page list (first, last,
current +/-1, collapsing gaps into an ellipsis) instead of only
previous/next — see shared/utils/pagination.ts's paginationRange().

Renders page links via NuxtLink's custom/v-slot API rather than letting
it render its own <a>: RouterLink's built-in active-class/aria-current
detection compares only the route's path, not its query string, so
every ?page=N link was incorrectly marked as the current page.

The language switch now shows both "Italiano / English" at all times,
with the current one as plain non-interactive text and the other as a
link, moved to the header's top-right corner instead of stacked under
the logo.
This commit is contained in:
2026-09-11 14:31:58 +02:00
parent 364fda3980
commit 1247a2ca07
12 changed files with 369 additions and 67 deletions
+13 -13
View File
@@ -94,6 +94,19 @@ h3 {
color: var(--color-muted);
}
/* Visually hidden but still announced by screen readers. */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Small uppercase label used for categories, dates and section headings. */
.kicker {
margin: 0;
@@ -223,16 +236,3 @@ h3 {
font-size: 0.9em;
}
.pagination {
display: flex;
flex-wrap: wrap;
gap: 1rem 2rem;
align-items: center;
justify-content: center;
margin-top: var(--gap-section);
padding-top: 2rem;
border-top: 1px solid var(--color-border);
font-size: 0.85rem;
letter-spacing: 0.06em;
text-transform: uppercase;
}