redesign: site-wide UI/UX overhaul per web-interface-guidelines
- unified design system: focus-visible rings, reduced-motion, color-scheme, theme persistence, tightened emerald radius tokens (checkbox circle bug) - redesigned all pages: Home/Login/Signup/404, dashboard shell, Overview hero (time-based gradient), list pages with empty states, form modals, detail pages - role-scoped navigation: console menu vs admin console with cross-switch entries, Chinese route titles and breadcrumbs - theme switcher (light/dark/auto) via composables/theme, home + dashboard - state-driven dropdowns (touch-safe logout), menu divider pointer-events fix - btn-primary unified to black-on-white / white-on-black per theme - update REFACTOR_PLAN.md (increments 2-6)
This commit is contained in:
@@ -4,7 +4,87 @@
|
||||
themes: light --default, dark, cupcake, emerald, pastel;
|
||||
}
|
||||
|
||||
/* 收紧 emerald 主题的圆角令牌:默认 selector 圆角过大,小尺寸复选框会渲染成正圆 */
|
||||
@plugin "daisyui/theme" {
|
||||
name: "emerald";
|
||||
--radius-selector: 0.5rem;
|
||||
--radius-field: 0.5rem;
|
||||
--radius-box: 0.75rem;
|
||||
}
|
||||
|
||||
@theme {
|
||||
--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
|
||||
"Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
|
||||
"Microsoft YaHei", sans-serif;
|
||||
}
|
||||
|
||||
/* 深浅色跟随 data-theme,修复滚动条与原生控件配色 */
|
||||
html {
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: var(--color-base-200);
|
||||
color: var(--color-base-content);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* 移动端去除双击缩放延迟与点击高亮 */
|
||||
button,
|
||||
a,
|
||||
[role="button"],
|
||||
input[type="checkbox"],
|
||||
input[type="radio"],
|
||||
summary {
|
||||
touch-action: manipulation;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
/* 统一可见键盘焦点(:focus-visible 不干扰鼠标点击) */
|
||||
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
|
||||
outline: 2px solid var(--color-primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* 弹层内禁止滚动穿透 */
|
||||
.modal-box {
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
|
||||
/* 普通主按钮统一黑白:浅色主题黑底白字,深色主题白底黑字(特殊按钮 success/error/warning/outline 不受影响) */
|
||||
.btn-primary {
|
||||
--btn-color: #171717;
|
||||
--btn-fg: #ffffff;
|
||||
--btn-soft-bg: initial;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
--btn-bg: #000000;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .btn-primary {
|
||||
--btn-color: #ffffff;
|
||||
--btn-fg: #171717;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .btn-primary:hover {
|
||||
--btn-bg: #e4e4e4;
|
||||
}
|
||||
|
||||
/* 尊重系统“减弱动态效果”偏好 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user