feat: 按 NqiTools 的方案生成登录页和侧栏

This commit is contained in:
2026-10-26 17:06:04 +08:00
parent 419c40b740
commit eaad01d5a8
74 changed files with 21165 additions and 175 deletions
+205 -3
View File
@@ -1,10 +1,212 @@
:root {
color: var(--ink);
background: var(--bg);
font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
font-size: 14px;
--bg: #f3f4f6;
--panel: #ffffff;
--ink: #111827;
--muted: #6b7280;
--line: #e5e7eb;
--accent: #2563eb;
--accent-soft: #eff6ff;
--sidebar: #ffffff;
}
:root[data-theme="dark"] {
--bg: #0f172a;
--panel: #1e293b;
--ink: #f8fafc;
--muted: #94a3b8;
--line: #334155;
--accent: #60a5fa;
--accent-soft: #1e3a8a;
--sidebar: #111827;
}
::selection {
background: var(--accent-soft);
color: var(--ink);
}
html,
body,
#app {
#app,
.app-root {
margin: 0;
height: 100%;
min-height: 0;
}
button,
input,
select {
font-family: inherit;
}
.gate {
position: relative;
box-sizing: border-box;
height: 100%;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 32px 16px;
background: var(--bg);
}
.theme-switch {
position: absolute;
top: 16px;
right: 16px;
}
.gate-card {
width: min(440px, 100%);
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
padding: 28px 28px 22px;
}
.brand {
display: flex;
gap: 14px;
align-items: center;
justify-content: center;
margin-bottom: 22px;
}
.brand-mark {
width: 44px;
height: 44px;
border-radius: 10px;
background: var(--accent);
color: #fff;
display: grid;
place-items: center;
flex: none;
font-size: 22px;
font-weight: 600;
line-height: 1;
}
.brand h1 {
margin: 0;
font-size: 20px;
line-height: 1.3;
}
.form-row {
display: grid;
grid-template-columns: 84px minmax(0, 1fr);
gap: 8px 12px;
align-items: center;
margin-bottom: 12px;
}
.form-row label {
display: flex;
align-items: center;
gap: 4px;
color: var(--ink);
}
.gate-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 8px;
}
.shell {
height: 100%;
background: var(--bg);
color: var(--ink);
}
.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%;
}
body {
background: #f5f7f6;
.sider-body {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
min-height: 0;
}
.sider-body .n-menu {
flex: 1;
min-height: 0;
}
.sider-user {
margin-top: auto;
padding: 12px;
border-top: 1px solid var(--line);
display: flex;
align-items: center;
gap: 8px;
}
.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;
}
.content {
min-width: 0;
min-height: 0;
height: 100%;
display: flex;
flex-direction: column;
}
.page {
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
padding: 16px 20px;
box-sizing: border-box;
}
.page-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.page-head h2 {
margin: 0;
font-size: 16px;
}