feat: 本次提交更新内容如下

这个样式很漂亮
This commit is contained in:
笔记本里的永平
2025-07-18 21:36:49 +08:00
parent 4ce3036c42
commit c9893b3371
2 changed files with 365 additions and 109 deletions

View File

@@ -1,70 +1,260 @@
.home-page {
padding: 12px;
background: #f5f5f5;
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
min-height: 100vh;
}
.home-cards {
// 导航栏样式
.nav-title {
display: flex;
gap: 12px;
margin-bottom: 12px;
> :global(.adm-card) {
flex: 1;
align-items: center;
justify-content: center;
}
.nav-text {
color: var(--primary-color);
font-weight: 700;
font-size: 18px;
text-shadow: 0 2px 4px rgba(24, 142, 238, 0.2);
}
// 统计卡片网格
.stats-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
margin-bottom: 16px;
}
.stat-card {
background: white;
border-radius: 12px;
padding: 12px 8px;
display: flex;
align-items: center;
gap: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
&:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
}
.home-section {
margin-bottom: 12px;
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.home-section-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 15px;
}
.home-scene-stats {
display: flex;
justify-content: space-between;
margin: 0 8px 8px 8px;
}
.home-scene-item {
flex: 1;
text-align: center;
}
.home-scene-icon {
margin: 0 auto 4px auto;
}
.home-scene-value {
font-size: 18px;
font-weight: bold;
color: #1677ff;
}
.home-scene-label {
font-size: 12px;
color: #888;
}
.home-today-item {
text-align: center;
padding: 8px 0;
background: #f7f8fa;
.stat-icon {
width: 32px;
height: 32px;
border-radius: 8px;
}
.home-today-value {
font-size: 18px;
font-weight: bold;
color: #1677ff;
}
.home-today-label {
font-size: 12px;
color: #888;
background: rgba(24, 142, 238, 0.1);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.home-chart {
margin-top: 8px;
.stat-content {
flex: 1;
min-width: 0;
}
.stat-value {
font-size: 18px;
font-weight: 700;
color: var(--primary-color);
line-height: 1.2;
}
.stat-label {
font-size: 11px;
color: #666;
margin-top: 2px;
line-height: 1.2;
}
// 通用区域样式
.section {
background: white;
border-radius: 12px;
padding: 16px;
margin-bottom: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
&:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
}
.section-header {
margin-bottom: 12px;
}
.section-title {
font-size: 14px;
font-weight: 600;
color: #333;
position: relative;
padding-left: 8px;
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 3px;
height: 14px;
background: var(--primary-gradient);
border-radius: 2px;
}
}
// 场景统计网格
.scene-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
}
.scene-item {
text-align: center;
padding: 8px 4px;
}
.scene-icon {
width: 36px;
height: 36px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 6px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.scene-value {
font-size: 16px;
font-weight: 700;
color: #333;
margin-bottom: 2px;
line-height: 1.2;
}
.scene-label {
font-size: 10px;
color: #666;
line-height: 1.2;
}
// 今日数据网格
.today-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
}
.today-item {
text-align: center;
padding: 8px 4px;
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
border-radius: 8px;
transition: all 0.3s ease;
&:hover {
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
}
.today-icon {
margin-bottom: 4px;
opacity: 0.8;
}
.today-value {
font-size: 14px;
font-weight: 700;
margin-bottom: 2px;
line-height: 1.2;
}
.today-label {
font-size: 10px;
color: #666;
line-height: 1.2;
}
// 图表容器
.chart-container {
width: 100%;
min-height: 100px;
min-height: 160px;
border-radius: 8px;
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
padding: 12px;
}
// 响应式设计
@media (max-width: 375px) {
.home-page {
padding: 8px;
}
.stats-grid {
gap: 6px;
margin-bottom: 12px;
}
.stat-card {
padding: 10px 6px;
}
.stat-icon {
width: 28px;
height: 28px;
}
.stat-value {
font-size: 16px;
}
.stat-label {
font-size: 10px;
}
.section {
padding: 12px;
margin-bottom: 8px;
}
.scene-grid,
.today-grid {
gap: 6px;
}
.scene-icon {
width: 32px;
height: 32px;
}
.scene-value {
font-size: 14px;
}
.scene-label {
font-size: 9px;
}
.today-value {
font-size: 12px;
}
.today-label {
font-size: 9px;
}
.chart-container {
min-height: 140px;
padding: 8px;
}
}