Initializing LoRA Manager
+Scanning and building LoRA cache. This may take a few minutes...
+From e7233c147d7fbd27b91fd977df7e523201c6027b Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Thu, 13 Mar 2025 15:04:18 +0800 Subject: [PATCH] checkpoint --- static/css/base.css | 14 +- static/css/components/header.css | 102 ++++++++--- static/css/layout.css | 198 ++-------------------- templates/components/corner_controls.html | 22 --- templates/components/header.html | 25 ++- templates/loras.html | 72 +++----- templates/recipes.html | 50 ++---- 7 files changed, 164 insertions(+), 319 deletions(-) delete mode 100644 templates/components/corner_controls.html diff --git a/static/css/base.css b/static/css/base.css index 2d305567..985cb62f 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -1,6 +1,8 @@ -/* 强制显示滚动条,防止页面跳动 */ -html { - overflow-y: scroll; +html, body { + margin: 0; + padding: 0; + height: 100%; + overflow: hidden; /* Disable default scrolling */ } /* 针对Firefox */ @@ -16,6 +18,7 @@ html { ::-webkit-scrollbar-track { background: transparent; + margin-top: 0; } ::-webkit-scrollbar-thumb { @@ -43,6 +46,7 @@ html { /* Z-index Scale */ --z-base: 10; + --z-header: 100; --z-modal: 1000; --z-overlay: 2000; @@ -67,8 +71,10 @@ html { } body { - margin: 0; font-family: 'Segoe UI', sans-serif; background: var(--bg-color); color: var(--text-color); + display: flex; + flex-direction: column; + padding-top: 0; /* Remove the padding-top */ } diff --git a/static/css/components/header.css b/static/css/components/header.css index 9cb4e51e..ebabad5e 100644 --- a/static/css/components/header.css +++ b/static/css/components/header.css @@ -1,11 +1,12 @@ .app-header { background: var(--card-bg); border-bottom: 1px solid var(--border-color); - position: sticky; + position: fixed; top: 0; z-index: var(--z-header); - height: 60px; + height: 48px; /* Reduced height */ width: 100%; + box-shadow: 0 1px 3px rgba(0,0,0,0.05); } .header-container { @@ -18,46 +19,105 @@ height: 100%; } +/* Logo and title styling */ +.header-branding { + display: flex; + align-items: center; +} + +.logo-link { + display: flex; + align-items: center; + text-decoration: none; + color: var(--text-color); + gap: 8px; +} + +.app-logo { + width: 24px; + height: 24px; +} + +.app-title { + font-size: 1rem; + font-weight: 600; + margin: 0; +} + +/* Navigation styling */ .main-nav { display: flex; - gap: 1rem; + gap: 0.5rem; } .nav-item { - padding: 0.5rem 1rem; - border-radius: var(--border-radius-base); + padding: 0.25rem 0.75rem; + border-radius: var(--border-radius-xs); color: var(--text-color); text-decoration: none; display: flex; align-items: center; gap: 0.5rem; transition: all 0.2s ease; + font-size: 0.9rem; } -.nav-item:hover { - background: var(--lora-surface-hover); +/* Header controls (formerly corner controls) */ +.header-controls { + display: flex; + align-items: center; + gap: 8px; } -.nav-item.active { - background: var(--lora-primary); - color: var(--lora-text-on-primary); +.header-controls > div { + width: 32px; + height: 32px; + border-radius: 50%; + background: var(--card-bg); + border: 1px solid var(--border-color); + color: var(--text-color); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: all 0.2s ease; + position: relative; +} + +.header-controls > div:hover { + background: var(--lora-accent); + color: white; + transform: translateY(-2px); +} + +.theme-toggle .light-icon { + opacity: 0; +} + +.theme-toggle .dark-icon { + opacity: 1; +} + +[data-theme="light"] .theme-toggle .light-icon { + opacity: 1; +} + +[data-theme="light"] .theme-toggle .dark-icon { + opacity: 0; } /* Mobile adjustments */ @media (max-width: 768px) { - .header-container { - flex-direction: column; - padding-top: 0.5rem; - height: auto; + .app-title { + display: none; /* Hide text title on mobile */ } - .app-header { - height: auto; + .header-controls { + gap: 4px; } - .main-nav { - width: 100%; - justify-content: center; - margin-top: 0.5rem; + .header-controls > div { + width: 28px; + height: 28px; } -} +} \ No newline at end of file diff --git a/static/css/layout.css b/static/css/layout.css index e4f8a74c..db14461a 100644 --- a/static/css/layout.css +++ b/static/css/layout.css @@ -1,7 +1,17 @@ +.page-content { + height: calc(100vh - 48px); /* Full height minus header */ + margin-top: 48px; /* Push down below header */ + overflow-y: auto; /* Enable scrolling here */ + width: 100%; + position: relative; +} + .container { max-width: 1400px; margin: 20px auto; padding: 0 15px; + position: relative; + z-index: var(--z-base); } .controls { @@ -19,111 +29,11 @@ width: 100%; } -/* Search and filter styles moved to components/search-filter.css */ - -/* Update corner-controls for collapsible behavior */ -.corner-controls { - position: fixed; - top: 20px; - right: 20px; - z-index: var(--z-overlay); - display: flex; - flex-direction: column; - align-items: center; - transition: all 0.3s ease; -} - -.corner-controls-toggle { - width: 36px; - height: 36px; - border-radius: 50%; - background: var(--card-bg); - border: 1px solid var(--border-color); - color: var(--text-color); - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - transition: all 0.2s ease; - z-index: 2; - margin-bottom: 10px; -} - -.corner-controls-toggle:hover { - background: var(--lora-accent); - color: white; - transform: translateY(-2px); -} - -.corner-controls-items { - display: flex; - flex-direction: column; - gap: 10px; - opacity: 0; - transform: translateY(-10px) scale(0.9); - transition: all 0.3s ease; - pointer-events: none; -} - -/* Expanded state */ -.corner-controls.expanded .corner-controls-items { - opacity: 1; - transform: translateY(0) scale(1); - pointer-events: all; -} - -/* Expanded state - only expand on hover if not already expanded by click */ -.corner-controls:hover:not(.expanded) .corner-controls-items { - opacity: 1; - transform: translateY(0) scale(1); - pointer-events: all; -} - /* Ensure hidden class works properly */ .hidden { display: none !important; } -/* Update toggle button styles */ -.update-toggle { - width: 36px; - height: 36px; - border-radius: 50%; - background: var(--card-bg); - border: 1px solid var(--border-color); - color: var(--text-color); /* Changed from var(--lora-accent) to match other toggles */ - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - transition: all 0.2s ease; - position: relative; -} - -.update-toggle:hover { - background: var(--lora-accent); - color: white; - transform: translateY(-2px); -} - -/* Update badge styles */ -.update-badge { - position: absolute; - top: -3px; - right: -3px; - background-color: var(--lora-error); - width: 8px; - height: 8px; - border-radius: 50%; - box-shadow: 0 0 0 2px var(--card-bg); -} - -/* Badge on corner toggle */ -.corner-badge { - top: 0; - right: 0; -} - .folder-tags-container { position: relative; width: 100%; @@ -263,81 +173,6 @@ transform: translateY(-2px); } -.theme-toggle { - width: 36px; - height: 36px; - border-radius: 50%; - background: var(--card-bg); - border: 1px solid var(--border-color); - color: var(--text-color); - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - transition: all 0.2s ease; -} - -.theme-toggle:hover { - background: var(--lora-accent); - color: white; - transform: translateY(-2px); -} - -.support-toggle { - width: 36px; - height: 36px; - border-radius: 50%; - background: var(--card-bg); - border: 1px solid var(--border-color); - color: var(--lora-error); - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - transition: all 0.2s ease; -} - -.support-toggle:hover { - background: var(--lora-error); - color: white; - transform: translateY(-2px); -} - -.support-toggle i { - font-size: 1.1em; - position: relative; - top: 1px; - left: -0.5px; -} - -.theme-toggle img { - width: 20px; - height: 20px; -} - -.theme-toggle .theme-icon { - width: 20px; - height: 20px; - position: absolute; - transition: opacity 0.2s ease; -} - -.theme-toggle .light-icon { - opacity: 0; -} - -.theme-toggle .dark-icon { - opacity: 1; -} - -[data-theme="light"] .theme-toggle .light-icon { - opacity: 1; -} - -[data-theme="light"] .theme-toggle .dark-icon { - opacity: 0; -} - @media (max-width: 768px) { .actions { flex-wrap: wrap; @@ -369,19 +204,6 @@ transform: none; } - .corner-controls { - top: 10px; - right: 10px; - } - - .corner-controls-items { - display: none; - } - - .corner-controls.expanded .corner-controls-items { - display: flex; - } - .back-to-top { bottom: 60px; /* Give some extra space from bottom on mobile */ } diff --git a/templates/components/corner_controls.html b/templates/components/corner_controls.html deleted file mode 100644 index c6be6a1c..00000000 --- a/templates/components/corner_controls.html +++ /dev/null @@ -1,22 +0,0 @@ -
Scanning and building LoRA cache. This may take a few minutes...
-Scanning and building LoRA cache. This may take a few minutes...
+Scanning and building recipe cache. This may take a few moments...
-Scanning and building recipe cache. This may take a few moments...