mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
css: fix nav active state, deduplicate .site-nav__right, add font-display, clean up search pagination
- common.css: add font-display: swap to Combinedd.otf @font-face (eliminates FOIT) - common.css: remove duplicate .site-nav__right block (identical to .site-nav__link); update nav.php to use .site-nav__link on the À Propos link - common.css: add .site-nav__link--active rule (opacity:1 + white underline); the class was already applied in nav.php but had no CSS definition, making it invisible - search.php: replace fully inline-styled pagination with .pagination-wrap / .pagination-btn / .pagination-info classes; add aria-disabled + tabindex=-1 on disabled links; add aria-label on prev/next links - search.css: add pagination rule block to match, keeping styles co-located with the page
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
@font-face {
|
||||
font-family: "police1";
|
||||
src: url("./fonts/Combinedd.otf");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
@@ -84,19 +85,10 @@ a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.site-nav__right {
|
||||
font-size: 0.85rem;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--white);
|
||||
text-decoration: none;
|
||||
font-weight: 400;
|
||||
opacity: 0.92;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
.site-nav__right:hover {
|
||||
.site-nav__link--active {
|
||||
opacity: 1;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.6);
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
|
||||
@@ -269,6 +269,47 @@ html, body {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Search results pagination — reuses same token names as main.css */
|
||||
.pagination-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 1.5rem 0;
|
||||
}
|
||||
|
||||
.pagination-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 2rem;
|
||||
height: 2rem;
|
||||
padding: 0 0.5rem;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 3px;
|
||||
color: var(--black);
|
||||
font-size: 0.9rem;
|
||||
text-decoration: none;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
|
||||
.pagination-btn:hover:not(.disabled) {
|
||||
border-color: var(--purple);
|
||||
color: var(--purple);
|
||||
}
|
||||
|
||||
.pagination-btn.disabled {
|
||||
opacity: 0.3;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.pagination-info {
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-muted);
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
|
||||
.search-empty {
|
||||
padding: 3rem 1.5rem;
|
||||
color: var(--text-muted);
|
||||
|
||||
@@ -157,12 +157,16 @@ $searchBarValue = $_GET['query'] ?? '';
|
||||
</div>
|
||||
|
||||
<?php if ($totalPages > 1): ?>
|
||||
<div style="display:flex;gap:.5rem;justify-content:center;align-items:center;padding:1.5rem 0;">
|
||||
<div class="pagination-wrap">
|
||||
<a href="?<?= http_build_query(array_merge($_GET, ['page' => max(1, $page - 1)])) ?>"
|
||||
style="padding:.25rem .7rem;border:1px solid #ddd;border-radius:3px;color:#111;text-decoration:none;<?= $page <= 1 ? 'opacity:.3;pointer-events:none;' : '' ?>">‹</a>
|
||||
<span style="font-size:.9rem;color:#666;"><?= $page ?> / <?= $totalPages ?></span>
|
||||
class="pagination-btn<?= $page <= 1 ? ' disabled' : '' ?>"
|
||||
<?= $page <= 1 ? 'aria-disabled="true" tabindex="-1"' : '' ?>
|
||||
aria-label="Page précédente">‹</a>
|
||||
<span class="pagination-info"><?= $page ?> / <?= $totalPages ?></span>
|
||||
<a href="?<?= http_build_query(array_merge($_GET, ['page' => min($totalPages, $page + 1)])) ?>"
|
||||
style="padding:.25rem .7rem;border:1px solid #ddd;border-radius:3px;color:#111;text-decoration:none;<?= $page >= $totalPages ? 'opacity:.3;pointer-events:none;' : '' ?>">›</a>
|
||||
class="pagination-btn<?= $page >= $totalPages ? ' disabled' : '' ?>"
|
||||
<?= $page >= $totalPages ? 'aria-disabled="true" tabindex="-1"' : '' ?>
|
||||
aria-label="Page suivante">›</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user