From c98b1d8ebeb7ba5e0dec82083fa2987d9b9ec112 Mon Sep 17 00:00:00 2001 From: kushidou Date: Sat, 18 Jul 2026 21:00:34 +0800 Subject: [PATCH] feat: add image lightbox and simplify alt option display to model only --- index.html | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 3bbf9d2..b9174c2 100644 --- a/index.html +++ b/index.html @@ -139,6 +139,12 @@ body { object-fit: contain; background: #f5f5f5; border: 1px solid #eee; + cursor: pointer; + transition: transform 0.2s; +} + +.cell-img:hover { + transform: scale(1.05); } .cell-img-placeholder { @@ -431,6 +437,47 @@ body { .import-box p { margin-bottom: 16px; color: #666; } +/* Lightbox */ +.lightbox { + display: none; + position: fixed; + inset: 0; + background: rgba(0,0,0,0.85); + z-index: 2000; + justify-content: center; + align-items: center; + cursor: pointer; +} + +.lightbox.active { display: flex; } + +.lightbox img { + max-width: 90vw; + max-height: 90vh; + border-radius: 8px; + box-shadow: 0 4px 24px rgba(0,0,0,0.4); +} + +.lightbox-close { + position: absolute; + top: 20px; + right: 24px; + background: rgba(255,255,255,0.2); + border: none; + color: #fff; + font-size: 28px; + cursor: pointer; + width: 40px; + height: 40px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + transition: background 0.2s; +} + +.lightbox-close:hover { background: rgba(255,255,255,0.3); } + /* Responsive */ @media (max-width: 768px) { .container { padding: 12px; } @@ -570,6 +617,12 @@ body { + + +