左侧折叠

This commit is contained in:
dekun
2026-05-14 17:02:56 +08:00
parent b176bbc527
commit ea1c4bcf12
2 changed files with 142 additions and 3 deletions
+88 -1
View File
@@ -78,8 +78,95 @@ a:hover {
background: var(--panel);
border-right: 1px solid var(--border);
overflow-y: auto;
padding: 0.75rem 0;
padding: 0 0 0.75rem;
flex-shrink: 0;
transition:
width 0.22s ease,
min-width 0.22s ease,
max-width 0.22s ease,
opacity 0.18s ease,
padding 0.22s ease,
border-color 0.22s ease;
}
.layout-main.sidebar-collapsed .sidebar {
width: 0;
min-width: 0;
max-width: 0;
padding: 0;
overflow: hidden;
opacity: 0;
pointer-events: none;
border-right-color: transparent;
}
.sidebar-toolbar {
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0.45rem 0.5rem 0.35rem;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.btn-sidebar-toggle {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
padding: 0;
border-radius: 6px;
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.04);
color: var(--muted);
font: inherit;
font-size: 1rem;
line-height: 1;
cursor: pointer;
transition:
color 0.15s ease,
border-color 0.15s ease,
background 0.15s ease;
}
.btn-sidebar-toggle:hover {
color: var(--text);
border-color: var(--muted);
background: rgba(61, 139, 253, 0.1);
}
.btn-sidebar-expand {
flex-shrink: 0;
align-self: stretch;
width: 2rem;
min-height: 0;
margin: 0;
padding: 0;
border: none;
border-right: 1px solid var(--border);
background: var(--panel);
color: var(--muted);
font: inherit;
font-size: 1.05rem;
line-height: 1;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition:
color 0.15s ease,
background 0.15s ease,
border-color 0.15s ease;
}
.btn-sidebar-expand:hover {
color: var(--text);
background: rgba(61, 139, 253, 0.08);
}
.btn-sidebar-expand[hidden] {
display: none;
}
.sidebar-section {