refactor(frontend): Rework home layout and user interactions

This commit is contained in:
2026-04-22 16:45:00 +08:00
parent 79f255bf6c
commit 59e87faba9
84 changed files with 8299 additions and 2181 deletions
+119 -33
View File
@@ -11,17 +11,19 @@ html,
body {
width: 100%;
min-height: 100vh;
font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji';
font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
font-size: 14px;
line-height: 1.5;
color: #18191c;
background-color: #f6f7fb;
background-color: #f4f5f7;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
min-width: 320px;
}
a {
color: inherit;
text-decoration: none;
@@ -85,56 +87,54 @@ select {
// 主题变量
:root {
// 主色调
--primary-color: #fb7299;
--primary-hover-color: #ff85ad;
// 辅助色
--link-color: #00a1d6;
--link-hover-color: #33b4de;
--success-color: #52c41a;
--warning-color: #faad14;
--error-color: #ff4d4f;
--info-color: #1890ff;
// 粉色(B站风格)
--pink-color: #fb7299;
--pink-hover-color: #ff85ad;
// 文字颜色
--text-primary: #18191c;
--text-secondary: #61666d;
--text-tertiary: #9499a0;
--text-white: #fff;
// 背景颜色
--bg-primary: #f6f7fb;
--bg-primary: #f4f5f7;
--bg-secondary: #fff;
--bg-tertiary: #f1f2f3;
// 边框颜色
--bg-tertiary: #f6f7f8;
--bg-soft-blue: #edf7ff;
--bg-soft-pink: #fff2f6;
--border-color: #e3e5e7;
--border-light: #f1f2f3;
// 阴影
--shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.04);
--shadow-md: 0 10px 28px rgba(15, 23, 42, 0.08);
--shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.12);
// 圆角
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
// 间距
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.08);
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 16px;
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
// 布局
--header-height: 60px;
--header-top-height: 42px;
--header-main-height: 74px;
--header-height: 74px;
--header-total-height: 116px;
--home-banner-height: 190px;
--sidebar-width: 200px;
--max-content-width: 1400px;
--max-content-width: 1380px;
}
@media (max-width: 768px) {
:root {
--header-main-height: 56px;
--header-height: 56px;
--header-total-height: 56px;
--home-banner-height: 132px;
}
}
// 暗色主题
@@ -203,6 +203,92 @@ select {
box-shadow: var(--shadow-sm);
}
.page-shell {
width: min(var(--max-content-width), calc(100% - 24px));
margin: 0 auto;
}
// Vant feedback layer overrides
:root {
--van-dialog-width: 420px;
--van-dialog-radius: 20px;
--van-dialog-background: rgba(255, 255, 255, 0.98);
--van-dialog-has-title-message-text-color: #61666d;
--van-dialog-message-font-size: 14px;
--van-dialog-confirm-button-text-color: #fb7299;
--van-dialog-cancel-button-text-color: #61666d;
--van-toast-radius: 18px;
--van-toast-default-width: auto;
--van-toast-background: rgba(24, 25, 28, 0.88);
--van-toast-text-color: #fff;
--van-notify-radius: 0 0 18px 18px;
}
.van-overlay {
backdrop-filter: blur(4px);
}
.van-dialog {
border-radius: 20px !important;
overflow: hidden;
box-shadow: 0 20px 44px rgba(15, 23, 42, 0.18);
.van-dialog__header {
padding: 22px 24px 6px;
font-size: 20px;
font-weight: 700;
color: #18191c;
text-align: left;
}
.van-dialog__message {
padding: 0 24px 18px;
line-height: 1.7;
text-align: left;
}
.van-dialog__footer {
padding: 0 16px 16px;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
&::after {
display: none;
}
}
.van-dialog__confirm,
.van-dialog__cancel {
height: 42px;
margin: 0;
border-radius: 14px;
border: 1px solid #e9edf2;
font-size: 15px;
font-weight: 600;
}
.van-dialog__cancel {
background: #f6f7f8;
}
.van-dialog__confirm {
background: #fff2f6;
border-color: #ffd5e2;
}
}
.van-toast {
padding: 12px 16px;
box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
font-size: 14px;
line-height: 1.5;
}
.van-notify {
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
// 骨架屏动画
.skeleton {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);