diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-06-24 00:51:42 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-06-24 00:51:42 +0900 |
| commit | ee1733816744a269f532ece6b241f4a99e007c49 (patch) | |
| tree | f4935bbd6870ef32f9fb052523375fd78d1d01b4 /src/ollama_web/static/style.css | |
| parent | 16a8bfebde12e2e3fa50b2a1384091158fdabe91 (diff) | |
レスポンシブデザイン対応
Diffstat (limited to 'src/ollama_web/static/style.css')
| -rw-r--r-- | src/ollama_web/static/style.css | 169 |
1 files changed, 168 insertions, 1 deletions
diff --git a/src/ollama_web/static/style.css b/src/ollama_web/static/style.css index d12cf48..9fb37ea 100644 --- a/src/ollama_web/static/style.css +++ b/src/ollama_web/static/style.css @@ -38,6 +38,172 @@ body { flex-direction: column; } +#sidebar-backdrop { + display: none; +} + +#menu-btn { + display: none; + background: transparent; + border: 1px solid var(--border); + border-radius: 6px; + color: var(--text); + font-size: 18px; + line-height: 1; + padding: 4px 10px; + margin-right: 8px; +} + +@media (max-width: 768px) { + #menu-btn { + display: inline-flex; + } + + #sidebar { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 260px; + z-index: 200; + transform: translateX(-100%); + transition: transform 0.2s ease; + } + + #sidebar.open { + transform: translateX(0); + } + + #sidebar-backdrop { + display: block; + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 150; + opacity: 0; + pointer-events: none; + transition: opacity 0.2s ease; + } + + #sidebar-backdrop.active { + opacity: 1; + pointer-events: auto; + } + + header { + gap: 8px; + padding: 8px 10px; + } + + header h1 { + font-size: 15px; + } + + .controls { + gap: 6px; + } + + .controls label[for="model-select"], + .think-toggle span { + display: none; + } + + select#model-select { + max-width: 120px; + } + + .input-row { + flex-wrap: nowrap; + gap: 6px; + } + + .attach-btn { + width: 34px; + height: 34px; + font-size: 16px; + order: 1; + flex-shrink: 0; + } + + textarea#input { + order: 2; + min-width: 0; + padding: 0 8px; + font-size: 14px; + height: 34px; + line-height: 34px; + resize: none; + } + + button#send-btn, + #cancel-btn { + order: 3; + padding: 0 10px; + font-size: 13px; + height: 34px; + flex-shrink: 0; + } +} + +@media (max-width: 520px) { + header { + flex-wrap: wrap; + padding: 8px; + gap: 6px; + } + + header h1 { + font-size: 14px; + order: 1; + } + + #menu-btn { + order: 0; + } + + .controls { + order: 2; + width: 100%; + margin-left: 0; + justify-content: space-between; + } + + select#model-select { + flex: 1; + max-width: none; + } + + .think-toggle { + font-size: 13px; + } + + #clear-btn { + font-size: 12px; + padding: 4px 6px; + } +} + +@media (max-width: 360px) { + .controls { + flex-wrap: wrap; + gap: 4px; + } + + select#model-select { + width: 100%; + order: 0; + } + + .think-toggle { + order: 1; + } + + #clear-btn { + order: 2; + margin-left: auto; + } +} + .sidebar-header { display: flex; align-items: center; @@ -312,4 +478,5 @@ textarea#input { font-family: inherit; } -button#send-btn { padding: 0 20px; }
\ No newline at end of file +button#send-btn { padding: 0 20px; } + |
