diff --git a/roles/hysteria2/templates/export/global-index.html.j2 b/roles/hysteria2/templates/export/global-index.html.j2 index 911ce8d..ff0c12e 100644 --- a/roles/hysteria2/templates/export/global-index.html.j2 +++ b/roles/hysteria2/templates/export/global-index.html.j2 @@ -262,7 +262,7 @@ display: flex; align-items: center; justify-content: center; - padding: 1.75rem 1rem; + padding: 1rem; box-sizing: border-box; background: rgba(8, 12, 18, 0.72); backdrop-filter: blur(10px); @@ -279,16 +279,19 @@ } .lightbox-panel { position: relative; - max-width: min(94vw, 832px); - max-height: calc(100dvh - 3.5rem); - width: 100%; + display: flex; + flex-direction: column; + width: min(94vw, 900px); + height: calc(100dvh - 2rem); + max-height: calc(100dvh - 2rem); padding: 1.25rem 1.25rem 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); text-align: center; - overflow: auto; + overflow: hidden; + box-sizing: border-box; transform: translateY(12px) scale(0.96); transition: transform 0.22s ease; } @@ -297,11 +300,10 @@ } .lightbox-panel img { display: block; + max-width: 100%; + max-height: 100%; width: auto; height: auto; - max-width: min(728px, 100%); - max-height: min(728px, calc(100dvh - 14rem)); - margin: 0 auto; aspect-ratio: 1; object-fit: contain; background: #fff; @@ -310,18 +312,28 @@ box-sizing: border-box; image-rendering: pixelated; } + .lightbox-media { + flex: 1 1 auto; + min-height: 0; + display: flex; + align-items: center; + justify-content: center; + } .lightbox-caption { + flex-shrink: 0; margin-top: 0.85rem; font-size: 0.95rem; font-weight: 650; color: var(--text); } .lightbox-hint { + flex-shrink: 0; margin-top: 0.25rem; font-size: 0.75rem; color: var(--muted); } .lightbox-actions { + flex-shrink: 0; margin-top: 1rem; display: flex; justify-content: center; @@ -522,7 +534,9 @@