From 9fb915c882d0d4696faecba6ed5021dfcd4d4fb2 Mon Sep 17 00:00:00 2001 From: uduki Date: Thu, 1 Oct 2026 10:43:22 +0900 Subject: [PATCH] =?UTF-8?q?fix(viewer):=20=E7=B8=A6=E3=82=B9=E3=82=AF?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=83=AB/=E3=82=B9=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=83=89=E5=88=87=E6=9B=BF=E3=80=81=E3=82=B5=E3=83=A0=E3=83=8D?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=83=89=E3=83=AD=E3=83=AF=E3=83=BC=E9=96=8B?= =?UTF-8?q?=E9=96=89=E3=80=81=E4=B8=8B=E9=83=A8=E3=83=84=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=90=E3=83=BC=E5=8F=8A=E3=81=B3=E3=82=AD=E3=83=BC=E3=83=9C?= =?UTF-8?q?=E3=83=BC=E3=83=89=E6=93=8D=E4=BD=9C=E3=82=92=E5=AE=8C=E5=85=A8?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Unified/Renderers/UnifiedHtmlRenderer.cs | 613 ++++++++++++++++-- 1 file changed, 554 insertions(+), 59 deletions(-) diff --git a/WebImageViewer/Class/Unified/Renderers/UnifiedHtmlRenderer.cs b/WebImageViewer/Class/Unified/Renderers/UnifiedHtmlRenderer.cs index 5f9dce4..8f86eb0 100644 --- a/WebImageViewer/Class/Unified/Renderers/UnifiedHtmlRenderer.cs +++ b/WebImageViewer/Class/Unified/Renderers/UnifiedHtmlRenderer.cs @@ -885,6 +885,9 @@ public static class UnifiedHtmlRenderer flex-wrap: wrap; gap: 8px; margin: 12px 0; + padding: 0 16px; + max-width: 960px; + width: 100%; } .tag-pill { @@ -896,16 +899,7 @@ public static class UnifiedHtmlRenderer font-size: 0.8rem; } - /* ビューアーレイアウト */ - .viewer-container { - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - min-height: calc(100vh - var(--header-height)); - padding-bottom: 80px; - } - + /* コントロールバー */ .viewer-controls-bar { position: sticky; top: var(--header-height); @@ -914,11 +908,11 @@ public static class UnifiedHtmlRenderer backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-subtle); - padding: 10px 24px; + padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; - z-index: 900; + z-index: 890; flex-wrap: wrap; gap: 12px; } @@ -926,33 +920,55 @@ public static class UnifiedHtmlRenderer .control-group { display: flex; align-items: center; - gap: 8px; + gap: 10px; } .view-mode-btn { - background: rgba(255, 255, 255, 0.06); + background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border-subtle); color: var(--text-main); - padding: 6px 12px; + padding: 7px 14px; border-radius: 8px; - font-size: 0.82rem; + font-size: 0.85rem; + font-weight: 600; cursor: pointer; - transition: all 0.2s; + display: inline-flex; + align-items: center; + gap: 6px; + transition: all 0.2s ease; + } + + .view-mode-btn:hover { + background: rgba(255, 255, 255, 0.15); + border-color: rgba(255, 255, 255, 0.25); + transform: translateY(-1px); } .view-mode-btn.active { background: var(--accent-gradient-gallery); color: #fff; border-color: transparent; + box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); } - .images-stream { + /* メインビューアーコンテナ */ + .viewer-container { + display: flex; + flex-direction: column; + align-items: center; width: 100%; - max-width: 900px; + min-height: calc(100vh - var(--header-height) - 50px); + padding-bottom: 70px; + } + + /* 縦スクロールモード */ + .scroll-mode-view { + width: 100%; + max-width: 960px; display: flex; flex-direction: column; gap: 16px; - padding: 24px 16px; + padding: 16px 16px 40px; align-items: center; } @@ -964,7 +980,8 @@ public static class UnifiedHtmlRenderer background: rgba(0, 0, 0, 0.3); border-radius: 12px; overflow: hidden; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); + box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); + min-height: 200px; } .scroll-image-wrapper img { @@ -983,46 +1000,192 @@ public static class UnifiedHtmlRenderer position: absolute; bottom: 12px; right: 12px; - background: rgba(0, 0, 0, 0.7); + background: rgba(0, 0, 0, 0.75); + backdrop-filter: blur(8px); color: #fff; font-size: 0.75rem; - padding: 3px 8px; + padding: 3px 10px; border-radius: 6px; font-family: monospace; pointer-events: none; } - /* サムネイルドロワー */ + /* スライド(単ページ)モード */ + .slide-mode-view { + display: none; + position: fixed; + top: calc(var(--header-height) + 48px); + bottom: 56px; + left: 0; + right: 0; + align-items: center; + justify-content: center; + overflow: hidden; + background: #000; + z-index: 850; + } + + .slide-mode-view.active { + display: flex; + } + + .slide-stage { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + position: relative; + user-select: none; + } + + .slide-image { + max-width: 100%; + max-height: 100%; + object-fit: contain; + box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8); + transition: transform 0.15s ease-out; + } + + .slide-nav-zone { + position: absolute; + top: 0; + bottom: 0; + width: 30%; + z-index: 10; + cursor: pointer; + display: flex; + align-items: center; + opacity: 0; + transition: opacity 0.2s ease; + } + + .slide-nav-zone:hover { + opacity: 1; + } + + .slide-nav-prev { + left: 0; + justify-content: flex-start; + padding-left: 20px; + background: linear-gradient(to right, rgba(0, 0, 0, 0.5), transparent); + } + + .slide-nav-next { + right: 0; + justify-content: flex-end; + padding-right: 20px; + background: linear-gradient(to left, rgba(0, 0, 0, 0.5), transparent); + } + + .nav-arrow-icon { + width: 48px; + height: 48px; + border-radius: 50%; + background: rgba(15, 20, 34, 0.85); + border: 1px solid var(--border-subtle); + display: flex; + align-items: center; + justify-content: center; + color: #fff; + font-size: 1.2rem; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6); + } + + /* サムネイルドロワー & オーバーレイ */ + .drawer-overlay { + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.65); + backdrop-filter: blur(4px); + opacity: 0; + pointer-events: none; + transition: opacity 0.25s ease; + z-index: 940; + } + + .drawer-overlay.active { + opacity: 1; + pointer-events: auto; + } + .thumb-drawer { position: fixed; bottom: 0; left: 0; right: 0; - background: var(--bg-glass); - backdrop-filter: blur(20px); + height: 180px; + background: var(--bg-surface); border-top: 1px solid var(--border-subtle); - padding: 10px 16px; + display: flex; + flex-direction: column; + z-index: 950; + transform: translateY(100%); + transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); + box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6); + } + + .thumb-drawer.active { + transform: translateY(0); + } + + .thumb-drawer-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 8px 16px; + background: rgba(0, 0, 0, 0.3); + border-bottom: 1px solid var(--border-subtle); + font-size: 0.85rem; + color: var(--text-muted); + } + + .close-drawer-btn { + background: transparent; + border: none; + color: var(--text-muted); + font-size: 1.1rem; + cursor: pointer; + padding: 4px 8px; + border-radius: 4px; + transition: all 0.2s; + } + + .close-drawer-btn:hover { + color: #fff; + background: rgba(255, 255, 255, 0.1); + } + + .thumb-drawer-body { + flex: 1; display: flex; gap: 10px; overflow-x: auto; - z-index: 950; - max-height: 110px; + padding: 10px 16px; + align-items: center; } .thumb-item { flex-shrink: 0; - width: 60px; - height: 80px; + width: 75px; + height: 105px; position: relative; cursor: pointer; - border-radius: 6px; + border-radius: 8px; overflow: hidden; border: 2px solid transparent; - transition: border-color 0.2s; + transition: all 0.2s ease; + background: rgba(0, 0, 0, 0.4); + } + + .thumb-item:hover { + border-color: rgba(99, 102, 241, 0.5); + transform: translateY(-2px); } .thumb-item.active { border-color: var(--accent-primary); + box-shadow: 0 0 12px rgba(99, 102, 241, 0.6); } .thumb-item img { @@ -1036,10 +1199,95 @@ public static class UnifiedHtmlRenderer bottom: 0; left: 0; right: 0; - background: rgba(0, 0, 0, 0.7); + background: rgba(0, 0, 0, 0.75); color: #fff; - font-size: 0.65rem; + font-size: 0.7rem; text-align: center; + padding: 1px 0; + font-family: monospace; + } + + /* 下部固定ツールバー */ + .bottom-toolbar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 56px; + background: var(--bg-glass); + backdrop-filter: blur(16px); + -webkit-backdrop-filter: blur(16px); + border-top: 1px solid var(--border-subtle); + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 20px; + z-index: 920; + } + + .toolbar-left, .toolbar-right { + display: flex; + align-items: center; + gap: 12px; + } + + .toolbar-btn { + background: rgba(255, 255, 255, 0.08); + border: 1px solid var(--border-subtle); + color: var(--text-main); + width: 36px; + height: 36px; + border-radius: 8px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + font-size: 1.1rem; + transition: all 0.2s ease; + } + + .toolbar-btn:hover { + background: var(--accent-primary); + border-color: var(--accent-primary); + color: #fff; + } + + .page-counter { + font-family: 'Outfit', sans-serif; + font-size: 0.95rem; + font-weight: 600; + color: var(--text-muted); + } + + .current-page { + color: var(--text-main); + font-size: 1.15rem; + font-weight: 700; + } + + .progress-bar-container { + flex: 1; + max-width: 450px; + margin: 0 20px; + height: 6px; + background: rgba(255, 255, 255, 0.1); + border-radius: 3px; + overflow: hidden; + cursor: pointer; + position: relative; + } + + .progress-bar-fill { + height: 100%; + width: 0%; + background: var(--accent-gradient); + transition: width 0.15s ease; + } + + @media (max-width: 768px) { + .progress-bar-container { display: none; } + .viewer-controls-bar { padding: 8px 12px; } + .bottom-toolbar { padding: 0 12px; } } @@ -1069,48 +1317,295 @@ public static class UnifiedHtmlRenderer -
-
-
- {{safeTitle}} - (全{{totalPages}}ページ) -
-
- - -
+ +
+
+ {{safeTitle}} + (全{{totalPages}}ページ)
+
+ + + +
+
+
{{tagsHtml}} -
+ +
{{imagesHtml}}
-
- {{thumbsHtml}} + +
+
+
+ +
+ +
+ +
+
+ + +
+
+
+ 📖 サムネイル一覧 (全{{totalPages}}ページ) + +
+
+ {{thumbsHtml}} +
+
+ + +
+
+ +
+ 1 / {{totalPages}} +
+ +
+ +
+
+
+ +
+ + +
+