diff --git a/web/app.js b/web/app.js index 9e1190f..b6244f4 100644 --- a/web/app.js +++ b/web/app.js @@ -1392,6 +1392,41 @@ function initSlider() { renderShot(0) } +/* ---------- lightbox de capturas ---------- */ +function initLightbox() { + const lightbox = document.getElementById('lightbox') + const lightboxImg = document.getElementById('lightboxImg') + const lightboxCaption = document.getElementById('lightboxCaption') + const lightboxClose = document.getElementById('lightboxClose') + if (!lightbox || !lightboxImg) return + + function openLightbox(img) { + lightboxImg.src = img.currentSrc || img.src + lightboxImg.alt = img.alt + lightboxCaption.textContent = img.alt + lightbox.hidden = false + lightbox.setAttribute('aria-hidden', 'false') + if (lightboxClose) lightboxClose.focus() + document.body.style.overflow = 'hidden' + } + + function closeLightbox() { + lightbox.hidden = true + lightbox.setAttribute('aria-hidden', 'true') + document.body.style.overflow = '' + } + + document.querySelectorAll('img[data-shot]').forEach((img) => { + img.addEventListener('click', () => openLightbox(img)) + }) + if (lightboxClose) lightboxClose.addEventListener('click', closeLightbox) + lightbox.addEventListener('click', (e) => { if (e.target === lightbox) closeLightbox() }) + document.addEventListener('keydown', (e) => { + if (lightbox.hidden) return + if (e.key === 'Escape') closeLightbox() + }) +} + document.addEventListener('DOMContentLoaded', () => { initAppearance() initBackgroundCanvas() @@ -1403,5 +1438,6 @@ document.addEventListener('DOMContentLoaded', () => { initKofi() initTrafficRanges() initSlider() + initLightbox() heroCountUps() }) diff --git a/web/assets/shot-alerts-en-dark.webp b/web/assets/shot-alerts-en-dark.webp index b035419..93b7a36 100644 Binary files a/web/assets/shot-alerts-en-dark.webp and b/web/assets/shot-alerts-en-dark.webp differ diff --git a/web/assets/shot-alerts-en-light.webp b/web/assets/shot-alerts-en-light.webp index 21a135d..c1fdbfb 100644 Binary files a/web/assets/shot-alerts-en-light.webp and b/web/assets/shot-alerts-en-light.webp differ diff --git a/web/assets/shot-alerts-es-dark.webp b/web/assets/shot-alerts-es-dark.webp index 05607d7..4bb2068 100644 Binary files a/web/assets/shot-alerts-es-dark.webp and b/web/assets/shot-alerts-es-dark.webp differ diff --git a/web/assets/shot-alerts-es-light.webp b/web/assets/shot-alerts-es-light.webp index c59062a..92f4687 100644 Binary files a/web/assets/shot-alerts-es-light.webp and b/web/assets/shot-alerts-es-light.webp differ diff --git a/web/assets/shot-devices-en-dark.webp b/web/assets/shot-devices-en-dark.webp index 34e7edf..cc13171 100644 Binary files a/web/assets/shot-devices-en-dark.webp and b/web/assets/shot-devices-en-dark.webp differ diff --git a/web/assets/shot-devices-en-light.webp b/web/assets/shot-devices-en-light.webp index 5f93c1c..d4b97ea 100644 Binary files a/web/assets/shot-devices-en-light.webp and b/web/assets/shot-devices-en-light.webp differ diff --git a/web/assets/shot-devices-es-dark.webp b/web/assets/shot-devices-es-dark.webp index ece996f..a36f5af 100644 Binary files a/web/assets/shot-devices-es-dark.webp and b/web/assets/shot-devices-es-dark.webp differ diff --git a/web/assets/shot-devices-es-light.webp b/web/assets/shot-devices-es-light.webp index 8540ed9..6f8b37e 100644 Binary files a/web/assets/shot-devices-es-light.webp and b/web/assets/shot-devices-es-light.webp differ diff --git a/web/assets/shot-overview-en-dark.webp b/web/assets/shot-overview-en-dark.webp index d7b5399..d9d8ec2 100644 Binary files a/web/assets/shot-overview-en-dark.webp and b/web/assets/shot-overview-en-dark.webp differ diff --git a/web/assets/shot-overview-en-light.webp b/web/assets/shot-overview-en-light.webp index 42333da..dd2aedb 100644 Binary files a/web/assets/shot-overview-en-light.webp and b/web/assets/shot-overview-en-light.webp differ diff --git a/web/assets/shot-overview-es-dark.webp b/web/assets/shot-overview-es-dark.webp index ed03da3..948de20 100644 Binary files a/web/assets/shot-overview-es-dark.webp and b/web/assets/shot-overview-es-dark.webp differ diff --git a/web/assets/shot-overview-es-light.webp b/web/assets/shot-overview-es-light.webp index d1a2373..e7f4df5 100644 Binary files a/web/assets/shot-overview-es-light.webp and b/web/assets/shot-overview-es-light.webp differ diff --git a/web/assets/shot-routers-en-dark.webp b/web/assets/shot-routers-en-dark.webp index f89c3ec..508bb96 100644 Binary files a/web/assets/shot-routers-en-dark.webp and b/web/assets/shot-routers-en-dark.webp differ diff --git a/web/assets/shot-routers-en-light.webp b/web/assets/shot-routers-en-light.webp index 2c728cb..8fb6db7 100644 Binary files a/web/assets/shot-routers-en-light.webp and b/web/assets/shot-routers-en-light.webp differ diff --git a/web/assets/shot-routers-es-dark.webp b/web/assets/shot-routers-es-dark.webp index 10ed563..2ac423a 100644 Binary files a/web/assets/shot-routers-es-dark.webp and b/web/assets/shot-routers-es-dark.webp differ diff --git a/web/assets/shot-routers-es-light.webp b/web/assets/shot-routers-es-light.webp index 3127816..6a4a436 100644 Binary files a/web/assets/shot-routers-es-light.webp and b/web/assets/shot-routers-es-light.webp differ diff --git a/web/assets/shot-settings-en-dark.webp b/web/assets/shot-settings-en-dark.webp index f807656..dbef6a8 100644 Binary files a/web/assets/shot-settings-en-dark.webp and b/web/assets/shot-settings-en-dark.webp differ diff --git a/web/assets/shot-settings-en-light.webp b/web/assets/shot-settings-en-light.webp index 52f167a..dc8529d 100644 Binary files a/web/assets/shot-settings-en-light.webp and b/web/assets/shot-settings-en-light.webp differ diff --git a/web/assets/shot-settings-es-dark.webp b/web/assets/shot-settings-es-dark.webp index ff579d1..0f37e65 100644 Binary files a/web/assets/shot-settings-es-dark.webp and b/web/assets/shot-settings-es-dark.webp differ diff --git a/web/assets/shot-settings-es-light.webp b/web/assets/shot-settings-es-light.webp index 984a5e2..03ad90a 100644 Binary files a/web/assets/shot-settings-es-light.webp and b/web/assets/shot-settings-es-light.webp differ diff --git a/web/assets/shot-topology-en-dark.webp b/web/assets/shot-topology-en-dark.webp index 1deb574..2f79c8e 100644 Binary files a/web/assets/shot-topology-en-dark.webp and b/web/assets/shot-topology-en-dark.webp differ diff --git a/web/assets/shot-topology-en-light.webp b/web/assets/shot-topology-en-light.webp index a34d7d4..68dd649 100644 Binary files a/web/assets/shot-topology-en-light.webp and b/web/assets/shot-topology-en-light.webp differ diff --git a/web/assets/shot-topology-es-dark.webp b/web/assets/shot-topology-es-dark.webp index a0ec4f1..41e2f9e 100644 Binary files a/web/assets/shot-topology-es-dark.webp and b/web/assets/shot-topology-es-dark.webp differ diff --git a/web/assets/shot-topology-es-light.webp b/web/assets/shot-topology-es-light.webp index 5a2125a..d399c2c 100644 Binary files a/web/assets/shot-topology-es-light.webp and b/web/assets/shot-topology-es-light.webp differ diff --git a/web/i18n.js b/web/i18n.js index 4065d95..1563583 100644 --- a/web/i18n.js +++ b/web/i18n.js @@ -143,6 +143,10 @@ const I18N = { s5: 'Alerts · the feed of what happens in your network', s6: 'Settings · appearance, users, routers and services', }, + lightbox: { + close: 'Close screenshot', + alt: 'Screenshot enlarged', + }, }, /* ---------------- ESPAÑOL ---------------- */ @@ -250,6 +254,10 @@ const I18N = { s5: 'Alertas · el feed de lo que pasa en tu red', s6: 'Ajustes · apariencia, usuarios, routers y servicios', }, + lightbox: { + close: 'Cerrar captura', + alt: 'Captura ampliada', + }, }, /* ---------------- 中文 (简体) ---------------- */ diff --git a/web/index.html b/web/index.html index 234bc3c..a830d5a 100644 --- a/web/index.html +++ b/web/index.html @@ -28,7 +28,7 @@ - + - + +
+ + +