Files
willmiao-ComfyUI-Lora-Manager/static/css/layout.css
T
2025-03-05 22:03:54 +08:00

678 lines
14 KiB
CSS

.container {
max-width: 1400px;
margin: 20px auto;
padding: 0 15px;
}
.controls {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: var(--space-2);
}
.actions {
display: flex;
align-items: center;
gap: var(--space-2);
flex-wrap: nowrap;
width: 100%;
}
.search-container {
position: relative;
width: 250px;
margin-left: auto;
flex-shrink: 0; /* 防止搜索框被压缩 */
display: flex;
align-items: center;
gap: 4px;
}
/* 调整搜索框样式以匹配其他控件 */
.search-container input {
width: 100%;
padding: 6px 75px 6px 12px; /* Increased right padding to accommodate both buttons */
border: 1px solid oklch(65% 0.02 256); /* 更深的边框颜色,提高对比度 */
border-radius: var(--border-radius-sm);
background: var(--lora-surface);
color: var(--text-color);
font-size: 0.9em;
height: 32px;
box-sizing: border-box; /* 确保padding不会增加总宽度 */
}
.search-container input:focus {
outline: none;
border-color: var(--lora-accent);
}
.search-icon {
position: absolute;
right: 80px; /* Adjusted to make space for both toggle buttons */
top: 50%;
transform: translateY(-50%);
color: oklch(var(--text-color) / 0.5);
pointer-events: none;
line-height: 1; /* 防止图标影响容器高度 */
}
/* 修改清空按钮样式 */
.search-clear {
position: absolute;
right: 105px; /* Adjusted further left to avoid overlapping */
top: 50%;
transform: translateY(-50%);
color: oklch(var(--text-color) / 0.5);
cursor: pointer;
border: none;
background: none;
padding: 4px 8px; /* 增加点击区域 */
display: none; /* 默认隐藏 */
line-height: 1;
transition: color 0.2s ease;
}
.search-clear:hover {
color: var(--lora-accent);
}
.search-clear.visible {
display: block;
}
.search-mode-toggle {
background: var(--lora-surface);
border: 1px solid oklch(65% 0.02 256);
border-radius: var(--border-radius-sm);
color: var(--text-color);
width: 32px;
height: 32px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
flex-shrink: 0;
}
.search-mode-toggle:hover {
background-color: var(--lora-surface-hover, oklch(95% 0.02 256));
color: var(--lora-accent);
border-color: var(--lora-accent);
}
.search-mode-toggle.active {
background-color: oklch(95% 0.05 256); /* Lighter background that's more consistent */
color: var(--lora-accent);
border-color: var(--lora-accent);
}
.search-mode-toggle i {
font-size: 0.9em;
}
.search-filter-toggle {
background: var(--lora-surface);
border: 1px solid oklch(65% 0.02 256);
border-radius: var(--border-radius-sm);
color: var(--text-color);
width: 32px;
height: 32px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
flex-shrink: 0;
position: relative;
}
.search-filter-toggle:hover {
background-color: var(--lora-surface-hover, oklch(95% 0.02 256));
color: var(--lora-accent);
border-color: var(--lora-accent);
}
.search-filter-toggle.active {
background-color: oklch(95% 0.05 256); /* Lighter background that's more consistent */
color: var(--lora-accent);
border-color: var(--lora-accent);
}
.search-filter-toggle i {
font-size: 0.9em;
}
.filter-badge {
position: absolute;
top: -6px;
right: -6px;
background-color: var(--lora-accent);
color: white;
width: 16px;
height: 16px;
border-radius: 50%;
font-size: 10px;
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
/* 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%;
margin-bottom: 8px; /* Add margin to ensure space for the button */
}
.folder-tags {
transition: max-height 0.3s ease, opacity 0.2s ease;
max-height: 150px; /* Limit height to prevent overflow */
opacity: 1;
overflow-y: auto; /* Enable vertical scrolling */
padding-right: 40px; /* Make space for the toggle button */
margin-bottom: 5px; /* Add margin below the tags */
}
.folder-tags.collapsed {
max-height: 0;
opacity: 0;
margin: 0;
padding-bottom: 0;
}
/* Toggle Folders Button */
.toggle-folders-btn {
position: absolute;
bottom: 0; /* 固定在容器底部 */
right: 0; /* 固定在容器右侧 */
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.3s ease;
z-index: 2;
}
.toggle-folders-btn:hover {
background: var(--lora-accent);
color: white;
transform: translateY(-2px);
}
.toggle-folders-btn i {
transition: transform 0.3s ease;
}
/* 折叠状态样式 */
.folder-tags.collapsed + .toggle-folders-btn {
position: static;
margin-right: auto; /* 确保按钮在左侧 */
transform: translateY(0);
}
.folder-tags.collapsed + .toggle-folders-btn i {
transform: rotate(180deg);
}
/* 文件夹标签样式 */
.folder-tags {
display: flex;
gap: 4px;
padding: 2px 0;
flex-wrap: wrap;
}
/* Add custom scrollbar for better visibility */
.folder-tags::-webkit-scrollbar {
width: 6px;
}
.folder-tags::-webkit-scrollbar-track {
background: var(--card-bg);
border-radius: 3px;
}
.folder-tags::-webkit-scrollbar-thumb {
background: var(--border-color);
border-radius: 3px;
}
.folder-tags::-webkit-scrollbar-thumb:hover {
background: var(--lora-accent);
}
.tag {
cursor: pointer;
padding: 2px 8px;
margin: 2px;
border: 1px solid #ccc;
border-radius: var(--border-radius-xs);
display: inline-block;
line-height: 1.2;
font-size: 14px;
}
.tag.active {
background-color: #007bff;
color: white;
}
/* Back to Top Button */
.back-to-top {
position: fixed;
bottom: 20px;
right: 20px;
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;
opacity: 0;
visibility: hidden;
transform: translateY(10px);
transition: all 0.3s ease;
z-index: var(--z-overlay);
}
.back-to-top.visible {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.back-to-top:hover {
background: var (--lora-accent);
color: white;
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;
}
/* Filter Panel Styles */
.filter-panel {
position: absolute;
top: 140px; /* Adjust to be closer to the filter button */
right: 20px;
width: 300px;
background-color: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: var(--border-radius-base);
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
z-index: var(--z-overlay); /* Increase z-index to be above cards */
padding: 16px;
transition: transform 0.3s ease, opacity 0.3s ease;
transform-origin: top right;
max-height: calc(100vh - 160px);
overflow-y: auto;
}
.filter-panel.hidden {
opacity: 0;
transform: scale(0.95);
pointer-events: none;
}
.filter-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.filter-header h3 {
margin: 0;
font-size: 18px;
color: var(--text-color);
}
.close-filter-btn {
background: none;
border: none;
color: var(--text-color);
cursor: pointer;
font-size: 16px;
padding: 4px;
display: flex;
align-items: center;
justify-content: center;
}
.close-filter-btn:hover {
color: var(--lora-accent);
}
.filter-section {
margin-bottom: 16px;
}
.filter-section h4 {
margin: 0 0 8px 0;
font-size: 14px;
color: var(--text-color);
opacity: 0.8;
}
.filter-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.filter-tag {
padding: 4px 10px;
border-radius: var(--border-radius-sm);
background-color: var(--lora-surface);
border: 1px solid var(--border-color);
color: var(--text-color);
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
user-select: none; /* Prevent text selection */
-webkit-user-select: none; /* For Safari */
-moz-user-select: none; /* For Firefox */
-ms-user-select: none; /* For IE/Edge */
}
.filter-tag:hover {
background-color: var(--lora-surface-hover);
}
.filter-tag.active {
background-color: var(--lora-accent);
color: white;
border-color: var(--lora-accent);
}
/* Base model tag specific styles - removing accent colors */
.filter-tag.base-model-tag.sd-1-5,
.filter-tag.base-model-tag.sd-2-0,
.filter-tag.base-model-tag.sd-2-1,
.filter-tag.base-model-tag.sdxl,
.filter-tag.base-model-tag.flux,
.filter-tag.base-model-tag.il,
.filter-tag.base-model-tag.pony,
.filter-tag.base-model-tag.hunyuan,
.filter-tag.base-model-tag.unknown {
/* Removing the specific colored borders */
border-left: none;
}
/* Filter actions */
.filter-actions {
display: flex;
justify-content: center;
margin-top: 16px;
gap: 8px;
}
.clear-filters-btn {
background-color: transparent;
color: var(--text-color);
border: 1px solid var(--border-color);
padding: 6px 12px;
border-radius: var(--border-radius-sm);
font-size: 14px;
cursor: pointer;
transition: background-color 0.2s ease;
width: 100%;
}
.clear-filters-btn:hover {
background-color: var(--lora-surface-hover);
}
/* Remove apply-filters-btn styles since we no longer need it */
@media (max-width: 768px) {
.actions {
flex-wrap: wrap;
gap: var(--space-1);
}
.controls {
flex-direction: column;
gap: 15px;
}
.search-container {
width: 100%;
order: -1;
margin-left: 0;
margin-right: 0;
}
.folder-tags-container {
order: -1;
}
.toggle-folders-btn {
position: absolute;
bottom: 0;
right: 0;
transform: none; /* 移除transform,防止hover时的位移 */
}
.toggle-folders-btn:hover {
transform: none; /* 移动端下禁用hover效果 */
}
.folder-tags.collapsed + .toggle-folders-btn {
position: relative;
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 */
}
.filter-panel {
width: calc(100% - 40px);
left: 20px;
right: 20px;
top: 140px;
}
}