fix: 侧边栏改成可收缩的 EunivTools 结构

This commit is contained in:
2026-10-30 11:23:59 +08:00
parent b052ce2ed0
commit 7be1679d64
4 changed files with 122 additions and 40 deletions
+51 -22
View File
@@ -11,44 +11,73 @@ button, input, select { font: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shell { display: flex; height: 100%; min-height: 0; }
.sider {
width: 216px;
flex: none;
.shell { height: 100%; background: var(--bg); color: var(--ink); }
.shell .n-layout,
.shell .n-layout-scroll-container,
.content { background: var(--bg); }
.shell .n-layout-sider { background: var(--sidebar); }
.shell .n-layout-sider > .n-scrollbar,
.shell .n-layout-sider .n-scrollbar-container,
.shell .n-layout-sider .n-scrollbar-content { height: 100%; }
.sider-body {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
background: var(--sidebar);
border-right: 1px solid var(--line);
min-height: 0;
}
.brand {
.sider-brand {
height: 56px;
display: flex;
align-items: center;
gap: 10px;
padding: 0 16px;
border-bottom: 1px solid var(--line);
font-weight: 650;
flex: none;
}
.nav { padding-top: 8px; }
.nav button, .text-button {
width: 100%;
text-align: left;
background: transparent;
color: var(--muted);
border: 0;
padding: 10px 16px;
cursor: pointer;
.sider-brand.compact { justify-content: center; padding: 0; }
.sider-brand strong { font-size: 15px; font-weight: 650; letter-spacing: -0.02em; }
.sider-brand .brand-mark { width: 28px; height: 28px; font-size: 14px; }
.sider-body .n-menu { flex: 1; min-height: 0; padding-top: 8px; }
.shell .n-menu .n-menu-item-content--selected::before {
background-color: transparent !important;
border-left: 2px solid var(--accent);
border-radius: 0;
}
.nav button.on { color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
.sider-foot {
.sider-user {
margin-top: auto;
padding: 12px;
border-top: 1px solid var(--line);
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}
.who { color: var(--muted); font-size: 12px; }
.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.sider-user.compact { flex-direction: column; padding: 8px 0 12px; }
.sider-user .who { min-width: 0; flex: 1; }
.sider-user strong,
.sider-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sider-user span { color: var(--muted); font-size: 12px; }
.logout-btn.n-button {
color: var(--danger);
--n-text-color: var(--danger);
--n-text-color-hover: var(--danger);
--n-text-color-pressed: var(--danger);
--n-text-color-focus: var(--danger);
}
.sider-user .theme-switch { position: static; }
.content {
min-width: 0;
min-height: 0;
height: 100%;
display: flex;
flex-direction: column;
}
.content > .n-layout-scroll-container,
.content > .n-scrollbar,
.content > .n-scrollbar > .n-scrollbar-container {
height: 100%;
overflow: hidden;
}
.page {
height: 100%;
min-height: 0;