forked from FWS/FWS-TEMPLATE-Website-OnePage
Fix(paquets): popup central pour l'aperçu des images + cache des assets versionné
- La visionneuse devient un vrai popup centré : fond assombri et flouté, carte animée à l'apparition, croix de fermeture, flèches précédent / suivant, compteur « 2 / 5 » et navigation au clavier (Échap, flèches gauche/droite). Clic sur le fond = fermeture, clic sur l'image = rien (fini les fermetures intempestives). - Un seul gestionnaire d'événements délégué remplace les multiples listeners : plus de doubles déclenchements ni d'états incohérents. - styles.css, paquets.css, nav.js et les scripts de page sont servis avec ?v=<date du fichier> : chaque mise à jour est immédiatement prise en compte par les navigateurs au lieu de rester bloquée 7 jours par le cache du .htaccess (cause des rendus mélangés observés).
This commit is contained in:
1 parent
f8066c89fc
commit
3b3127bb34
4 files changed
+205
-72
No files matched your search
+79
-12
@@ -401,7 +401,12 @@
|
||||
font-size: 0.72rem;
|
||||
}
|
||||
|
||||
/* Visionneuse plein écran */
|
||||
/* ── Popup central « aperçu de l'image » ── */
|
||||
|
||||
html.pkg-no-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pkg-lightbox {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
@@ -410,7 +415,9 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
background: rgba(2, 6, 23, 0.9);
|
||||
background: rgba(2, 6, 23, 0.55);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.pkg-lightbox.is-open {
|
||||
@@ -420,35 +427,59 @@
|
||||
.pkg-lightbox-figure {
|
||||
margin: 0;
|
||||
display: grid;
|
||||
gap: 0.6rem;
|
||||
max-width: min(1100px, 92vw);
|
||||
gap: 0.55rem;
|
||||
max-width: min(1000px, 90vw);
|
||||
animation: pkg-pop 220ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
|
||||
}
|
||||
|
||||
.pkg-lightbox-figure.is-animating {
|
||||
animation: pkg-pop 220ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
|
||||
}
|
||||
|
||||
@keyframes pkg-pop {
|
||||
from { opacity: 0; transform: scale(0.92); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
.pkg-lightbox-img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 82vh;
|
||||
max-height: 78vh;
|
||||
object-fit: contain;
|
||||
border-radius: 0.6rem;
|
||||
border-radius: 0.8rem;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.pkg-lightbox-figcap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.8rem;
|
||||
}
|
||||
|
||||
.pkg-lightbox-caption {
|
||||
color: #cbd5e1;
|
||||
color: #e2e8f0;
|
||||
font-size: 0.9rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pkg-lightbox-count {
|
||||
color: #94a3b8;
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
.pkg-lightbox-close {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1.2rem;
|
||||
width: 2.4rem;
|
||||
height: 2.4rem;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
border: 1px solid rgba(148, 163, 184, 0.4);
|
||||
border-radius: 999px;
|
||||
background: rgba(15, 23, 42, 0.7);
|
||||
background: rgba(15, 23, 42, 0.75);
|
||||
color: #e2e8f0;
|
||||
font-size: 1.3rem;
|
||||
font-size: 1.4rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -457,6 +488,42 @@
|
||||
border-color: #e2e8f0;
|
||||
}
|
||||
|
||||
.pkg-lightbox-nav {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 2.8rem;
|
||||
height: 2.8rem;
|
||||
border: 1px solid rgba(148, 163, 184, 0.35);
|
||||
border-radius: 999px;
|
||||
background: rgba(15, 23, 42, 0.75);
|
||||
color: #e2e8f0;
|
||||
font-size: 1.6rem;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pkg-lightbox-prev { left: 1.2rem; }
|
||||
.pkg-lightbox-next { right: 1.2rem; }
|
||||
|
||||
.pkg-lightbox-nav:hover {
|
||||
border-color: #e2e8f0;
|
||||
background: rgba(30, 41, 59, 0.9);
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.pkg-lightbox {
|
||||
padding: 1rem;
|
||||
}
|
||||
.pkg-lightbox-nav {
|
||||
top: auto;
|
||||
bottom: 1.2rem;
|
||||
transform: none;
|
||||
}
|
||||
.pkg-lightbox-prev { left: auto; right: 4.2rem; }
|
||||
.pkg-lightbox-next { right: 1.2rem; }
|
||||
}
|
||||
|
||||
.paquet-links {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
|
||||
Reference in new issue
Block a user