From efb31d0be26b80fd35cb91803a93b78c6948475b Mon Sep 17 00:00:00 2001 From: Sergey Antropoff Date: Thu, 23 Jul 2026 09:13:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20lightbox=20QR=20=D0=B2=D1=8B=D1=81=D0=BE?= =?UTF-8?q?=D1=82=D0=BE=D0=B9=20=D1=8D=D0=BA=D1=80=D0=B0=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=81=20=D0=BE=D1=82=D1=81=D1=82=D1=83=D0=BF=D0=B0=D0=BC=D0=B8?= =?UTF-8?q?=20=D1=81=D0=B2=D0=B5=D1=80=D1=85=D1=83/=D1=81=D0=BD=D0=B8?= =?UTF-8?q?=D0=B7=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/export/global-index.html.j2 | 14 +++++++++++--- roles/hysteria2/templates/export/index.html.j2 | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/roles/hysteria2/templates/export/global-index.html.j2 b/roles/hysteria2/templates/export/global-index.html.j2 index a39c4fc..6543616 100644 --- a/roles/hysteria2/templates/export/global-index.html.j2 +++ b/roles/hysteria2/templates/export/global-index.html.j2 @@ -251,7 +251,8 @@ display: flex; align-items: center; justify-content: center; - padding: 1.5rem; + padding: 1.75rem 1rem; + box-sizing: border-box; background: rgba(8, 12, 18, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); @@ -268,6 +269,7 @@ .lightbox-panel { position: relative; max-width: min(94vw, 640px); + max-height: calc(100dvh - 3.5rem); width: 100%; padding: 1.25rem 1.25rem 1rem; background: var(--bg-card); @@ -275,6 +277,7 @@ border-radius: 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); text-align: center; + overflow: auto; transform: translateY(12px) scale(0.96); transition: transform 0.22s ease; } @@ -282,13 +285,18 @@ transform: translateY(0) scale(1); } .lightbox-panel img { - width: 100%; - max-width: 560px; + display: block; + width: auto; height: auto; + max-width: min(560px, 100%); + max-height: min(560px, calc(100dvh - 14rem)); + margin: 0 auto; aspect-ratio: 1; + object-fit: contain; background: #fff; border-radius: 12px; padding: 1rem; + box-sizing: border-box; image-rendering: pixelated; } .lightbox-caption { diff --git a/roles/hysteria2/templates/export/index.html.j2 b/roles/hysteria2/templates/export/index.html.j2 index 7b929ed..b47027d 100644 --- a/roles/hysteria2/templates/export/index.html.j2 +++ b/roles/hysteria2/templates/export/index.html.j2 @@ -184,7 +184,8 @@ display: flex; align-items: center; justify-content: center; - padding: 1.5rem; + padding: 1.75rem 1rem; + box-sizing: border-box; background: rgba(8, 12, 18, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); @@ -201,6 +202,7 @@ .lightbox-panel { position: relative; max-width: min(94vw, 640px); + max-height: calc(100dvh - 3.5rem); width: 100%; padding: 1.25rem 1.25rem 1rem; background: var(--bg-card); @@ -208,6 +210,7 @@ border-radius: 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); text-align: center; + overflow: auto; transform: translateY(12px) scale(0.96); transition: transform 0.22s ease; } @@ -215,13 +218,18 @@ transform: translateY(0) scale(1); } .lightbox-panel img { - width: 100%; - max-width: 560px; + display: block; + width: auto; height: auto; + max-width: min(560px, 100%); + max-height: min(560px, calc(100dvh - 14rem)); + margin: 0 auto; aspect-ratio: 1; + object-fit: contain; background: #fff; border-radius: 12px; padding: 1rem; + box-sizing: border-box; image-rendering: pixelated; } .lightbox-caption {