style: 统一内容区卡片、表单和对话框排版
This commit is contained in:
+163
-77
@@ -11,6 +11,7 @@ button, input, select { font: inherit; }
|
||||
::selection { background: var(--accent-soft); }
|
||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
|
||||
/* shell — keep sider geometry and selected-edge indicator */
|
||||
.shell { height: 100%; background: var(--bg); color: var(--ink); }
|
||||
.shell .n-layout,
|
||||
.shell .n-layout-scroll-container,
|
||||
@@ -78,6 +79,8 @@ button, input, select { font: inherit; }
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* page chrome */
|
||||
.page {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
@@ -94,7 +97,7 @@ button, input, select { font: inherit; }
|
||||
gap: 16px;
|
||||
flex: none;
|
||||
margin: 0;
|
||||
padding: 0 16px 0 20px;
|
||||
padding: 0 24px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: var(--bg);
|
||||
}
|
||||
@@ -111,16 +114,40 @@ button, input, select { font: inherit; }
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding: 20px 24px 24px;
|
||||
padding: 20px 24px 28px;
|
||||
}
|
||||
.admin-status { margin: 0; color: var(--muted); }
|
||||
|
||||
/* surfaces */
|
||||
.surface {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.table-card { overflow: auto; }
|
||||
.table-card.compact,
|
||||
.empty-card.compact { width: min(720px, 100%); }
|
||||
.empty-card {
|
||||
min-height: 220px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 32px 24px;
|
||||
}
|
||||
.settings-card {
|
||||
width: min(520px, 100%);
|
||||
padding: 20px 22px 10px;
|
||||
}
|
||||
.settings-card .form-row:last-child { margin-bottom: 10px; }
|
||||
|
||||
/* tables */
|
||||
.admin-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.admin-table th,
|
||||
.admin-table td {
|
||||
padding: 10px 16px 10px 0;
|
||||
padding: 11px 16px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
@@ -129,30 +156,62 @@ button, input, select { font: inherit; }
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background: var(--bg);
|
||||
background: var(--panel-2);
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
font-weight: 550;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
.admin-table tbody tr:last-child td { border-bottom: 0; }
|
||||
.admin-table tbody tr:hover td { background: var(--hover); }
|
||||
.admin-table .col-actions {
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
}
|
||||
.admin-table .col-format,
|
||||
.admin-table .col-role { width: 88px; }
|
||||
.admin-table .col-pick { width: 128px; }
|
||||
.row-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* forms: label left, control right */
|
||||
.form-row {
|
||||
display: grid;
|
||||
grid-template-columns: max-content minmax(160px, 280px);
|
||||
gap: 8px 12px;
|
||||
grid-template-columns: 7em minmax(0, 1fr);
|
||||
gap: 8px 14px;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.form-row > * { min-width: 0; }
|
||||
.form-row > label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: var(--ink);
|
||||
line-height: 1.3;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.form-row .n-input,
|
||||
.form-row .n-select,
|
||||
.form-row .n-input-number,
|
||||
.form-row .n-date-picker { width: 100%; }
|
||||
.field-error { margin: 4px 0 0; color: var(--danger); font-size: 12px; }
|
||||
.form-row .n-date-picker,
|
||||
.form-row .n-radio-group { width: 100%; }
|
||||
.form-row > div { width: 100%; }
|
||||
.form-row:last-child { margin-bottom: 0; }
|
||||
.field-error { margin: 6px 0 0; color: var(--danger); font-size: 12px; line-height: 1.3; }
|
||||
.form-section {
|
||||
margin: 14px 0 8px;
|
||||
margin: 18px 0 10px;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
.gate-brand + .form-section,
|
||||
.form-section:first-child { margin-top: 0; }
|
||||
.hint-mark {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
@@ -163,26 +222,40 @@ button, input, select { font: inherit; }
|
||||
vertical-align: -2px;
|
||||
cursor: help;
|
||||
}
|
||||
.late { color: var(--danger); }
|
||||
.filters, .form-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 7em minmax(0, 1fr);
|
||||
gap: 8px 14px;
|
||||
align-items: center;
|
||||
}
|
||||
.late, .status-bad { color: var(--danger); }
|
||||
.status-ok { color: var(--ok); }
|
||||
.status-run { color: var(--accent); }
|
||||
.status-wait { color: var(--muted); }
|
||||
|
||||
.settings-form {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.settings-fields { max-width: 640px; }
|
||||
.settings-form .form-row label { min-width: 8em; }
|
||||
.setting-control {
|
||||
.settings-fields .form-row { grid-template-columns: 11em minmax(0, 1fr); }
|
||||
.settings-fields .n-radio-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 2px 18px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.setting-control {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
.setting-control .n-input-number { flex: 1; width: 100%; min-width: 0; }
|
||||
.setting-unit { flex: none; color: var(--muted); }
|
||||
.setting-control .n-input-number { width: 100%; min-width: 0; }
|
||||
.setting-unit { flex: none; color: var(--muted); line-height: 34px; }
|
||||
.panel { background: var(--panel); border: 1px solid var(--line); }
|
||||
.filters, .form-grid { display: grid; grid-template-columns: 112px minmax(0, 280px); gap: 8px 12px; align-items: center; }
|
||||
.gate-card.wide .form-grid { grid-template-columns: 112px minmax(0, 1fr); }
|
||||
.hint {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
@@ -194,6 +267,8 @@ button, input, select { font: inherit; }
|
||||
text-align: center;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* gate / login / install */
|
||||
.app-root { height: 100%; }
|
||||
.gate {
|
||||
position: relative;
|
||||
@@ -208,77 +283,74 @@ button, input, select { font: inherit; }
|
||||
}
|
||||
.gate .theme-switch { position: absolute; top: 16px; right: 16px; }
|
||||
.sider-foot .theme-switch { position: static; align-self: flex-start; }
|
||||
.gate-card {
|
||||
width: min(440px, 100%);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 4px;
|
||||
padding: 28px 28px 22px;
|
||||
}
|
||||
.gate-card.wide { width: min(560px, 100%); }
|
||||
.gate-submit.n-button {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
margin-top: 24px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.12em;
|
||||
}
|
||||
.gate-card,
|
||||
.lv-side {
|
||||
width: max-content;
|
||||
max-width: calc(100% - 32px);
|
||||
box-sizing: border-box;
|
||||
width: min(400px, 100%);
|
||||
background: var(--panel);
|
||||
color: var(--ink);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 4px;
|
||||
padding: 28px 24px 20px;
|
||||
border-radius: 8px;
|
||||
padding: 32px;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.gate-card.wide { width: min(480px, 100%); }
|
||||
.gate-brand,
|
||||
.lv-side .lv-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 18px;
|
||||
justify-content: flex-start;
|
||||
gap: 12px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.gate-brand h1,
|
||||
.lv-side h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
|
||||
.brand-mark,
|
||||
.lv-side .lv-mark {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: 1px solid var(--accent);
|
||||
color: var(--accent);
|
||||
border-radius: 4px;
|
||||
border-radius: 6px;
|
||||
font-weight: 650;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
flex: none;
|
||||
}
|
||||
.lv-side h1 { margin: 0; font-size: 18px; }
|
||||
.lv-side form,
|
||||
.lv-embed form {
|
||||
display: grid;
|
||||
grid-template-columns: max-content minmax(0, 1fr);
|
||||
column-gap: 8px;
|
||||
row-gap: 10px;
|
||||
grid-template-columns: 4em minmax(0, 1fr);
|
||||
column-gap: 12px;
|
||||
row-gap: 14px;
|
||||
align-items: center;
|
||||
}
|
||||
.lv-side form { grid-template-columns: max-content 220px; }
|
||||
.lv-side label,
|
||||
.lv-embed label { margin: 0; justify-self: end; }
|
||||
.lv-embed label {
|
||||
margin: 0;
|
||||
color: var(--ink);
|
||||
line-height: 1.3;
|
||||
}
|
||||
.lv-side .n-alert,
|
||||
.lv-embed .n-alert { grid-column: 1 / -1; }
|
||||
.lv-side .n-button,
|
||||
.lv-embed .n-button { grid-column: 2; width: 100%; }
|
||||
.lv-side .lv-go,
|
||||
.lv-embed .lv-go {
|
||||
.lv-embed .lv-go,
|
||||
.gate-submit.n-button {
|
||||
height: 36px;
|
||||
margin-top: 4px;
|
||||
margin-top: 8px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
.gate-submit.n-button {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.lv-captcha { display: flex; gap: 8px; align-items: center; min-width: 0; }
|
||||
.lv-captcha .n-input { flex: 1; min-width: 0; }
|
||||
.lv-captcha-box {
|
||||
width: 112px;
|
||||
height: 36px;
|
||||
width: 108px;
|
||||
height: 34px;
|
||||
flex: none;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
@@ -289,6 +361,7 @@ button, input, select { font: inherit; }
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
}
|
||||
.lv-captcha-box:hover { border-color: var(--accent); }
|
||||
.lv-captcha-box img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -309,26 +382,39 @@ button, input, select { font: inherit; }
|
||||
.sms-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-top: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.gate-brand {
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 22px;
|
||||
.captcha { height: 34px; cursor: pointer; }
|
||||
|
||||
/* dialogs: class is on the dialog/card itself; actions stay outside the scrolling body */
|
||||
.n-dialog.app-dialog,
|
||||
.n-card.app-dialog,
|
||||
.app-dialog .n-dialog,
|
||||
.app-dialog .n-card {
|
||||
width: min(440px, calc(100vw - 32px));
|
||||
}
|
||||
.gate-brand h1 { margin: 0; font-size: 20px; }
|
||||
.brand-mark {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--accent);
|
||||
color: var(--accent);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-weight: 650;
|
||||
.n-dialog.app-dialog-wide,
|
||||
.n-card.app-dialog-wide,
|
||||
.app-dialog-wide .n-dialog,
|
||||
.app-dialog-wide .n-card {
|
||||
width: min(480px, calc(100vw - 32px));
|
||||
}
|
||||
.n-dialog.app-dialog .n-dialog__content,
|
||||
.n-dialog.app-dialog-wide .n-dialog__content,
|
||||
.n-card.app-dialog .n-card__content,
|
||||
.n-card.app-dialog-wide .n-card__content,
|
||||
.app-dialog .n-dialog__content,
|
||||
.app-dialog-wide .n-dialog__content,
|
||||
.app-dialog .n-card__content,
|
||||
.app-dialog-wide .n-card__content {
|
||||
max-height: min(64vh, 560px);
|
||||
overflow: auto;
|
||||
}
|
||||
.n-dialog.app-dialog .n-dialog__action,
|
||||
.n-dialog.app-dialog-wide .n-dialog__action {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
background: var(--panel);
|
||||
}
|
||||
.captcha { height: 40px; cursor: pointer; }
|
||||
.row-actions { display: flex; gap: 8px; }
|
||||
|
||||
Reference in New Issue
Block a user