Refactor homepage layout to dashboard style for audit compliance

This commit is contained in:
2026-02-10 13:11:29 +08:00
parent a4b3fcdb05
commit d8a50f26ac
3 changed files with 369 additions and 301 deletions

View File

@@ -15,298 +15,329 @@ page {
flex-direction: column;
}
/* 顶部背景区 */
.header-bg {
/* --- Dashboard Header --- */
.dashboard-header {
width: 100%;
height: 340rpx; /* Adjusted height */
background: #11616B; /* Color 01 - Solid Color */
border-bottom-left-radius: 0; /* Removed radius as requested */
border-bottom-right-radius: 0; /* Removed radius as requested */
height: auto;
min-height: 280rpx;
background: linear-gradient(135deg, #11616B 0%, #0D4E56 100%);
padding: 40rpx;
padding-top: 100rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: flex-start;
box-shadow: 0 4rpx 12rpx rgba(17, 97, 107, 0.15);
position: relative;
overflow: hidden;
}
/* Removed ::after pseudo-element to remove the large transparent circle */
.header-content {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 0;
height: auto;
position: relative;
z-index: 2;
}
.text-area {
display: flex;
flex-direction: column;
justify-content: center;
gap: 8rpx;
justify-content: flex-start;
color: #fff;
position: relative;
z-index: 1;
}
.greeting {
color: rgba(255, 255, 255, 0.9);
font-size: 28rpx;
font-weight: 500;
.header-status-bar {
display: flex;
justify-content: space-between;
align-items: flex-start;
width: 100%;
margin-bottom: 30rpx;
}
.nickname {
color: #ffffff;
font-size: 48rpx;
font-weight: 700;
letter-spacing: 2rpx;
.date-group {
display: flex;
flex-direction: column;
}
.avatar-wrapper {
padding: 6rpx;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
backdrop-filter: blur(4rpx);
display: flex; /* Flex to center content */
align-items: center;
justify-content: center;
.date-text {
font-size: 56rpx;
font-weight: bold;
line-height: 1.2;
}
.avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background-color: #fff;
border: 4rpx solid #ffffff;
display: block; /* Remove inline spacing */
.weekday-text {
font-size: 28rpx;
opacity: 0.8;
margin-top: 4rpx;
}
/* 主要内容区 */
.user-entry {
background: rgba(255,255,255,0.2);
padding: 4rpx;
border-radius: 50%;
backdrop-filter: blur(4px);
}
.mini-avatar {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
display: block;
background: #fff;
}
.daily-quote {
background: rgba(0,0,0,0.1);
padding: 16rpx 24rpx;
border-radius: 12rpx;
margin-top: 10rpx;
align-self: flex-start;
max-width: 90%;
}
.quote-text {
font-size: 26rpx;
font-style: italic;
opacity: 0.95;
line-height: 1.4;
}
/* --- Main Content --- */
.main-content {
flex: 1;
width: 100%;
padding: 0 28rpx;
padding: 32rpx;
box-sizing: border-box;
margin-top: 20rpx; /* Separated layout */
margin-top: -30rpx;
z-index: 10;
padding-bottom: 60rpx;
background: #f6f8fa;
border-top-left-radius: 30rpx;
border-top-right-radius: 30rpx;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
}
.section-title {
font-size: 32rpx;
font-weight: 700;
color: #2d3436;
margin-left: 10rpx;
margin-bottom: 20rpx;
display: none;
display: block !important;
font-size: 34rpx;
font-weight: bold;
color: #333;
position: relative;
padding-left: 16rpx;
margin: 0;
}
/* 卡片列表 */
.section-title::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 8rpx;
height: 32rpx;
background: #11616B;
border-radius: 4rpx;
}
/* Formula Scroll */
.formula-scroll {
display: flex;
white-space: nowrap;
height: 160rpx;
width: 100%;
}
.formula-card {
display: inline-flex;
flex-direction: row;
align-items: center;
background: #fff;
width: 380rpx; /* Increased from 320rpx */
height: 140rpx;
margin-right: 20rpx;
border-radius: 20rpx;
padding: 24rpx;
box-sizing: border-box;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.03);
}
.formula-icon {
font-size: 48rpx;
margin-right: 20rpx;
width: 60rpx;
text-align: center;
flex-shrink: 0; /* Prevent icon shrinking */
}
.formula-info {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden; /* Prevent text overflow */
}
.formula-title {
font-size: 26rpx; /* Slightly smaller title */
color: #666;
margin-bottom: 6rpx;
}
.formula-value {
font-size: 28rpx; /* Adjusted from 30rpx */
font-weight: bold;
color: #333;
font-family: serif;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* --- Grid Layout --- */
.grid-container {
display: flex;
flex-direction: column;
gap: 20rpx;
display: flex;
flex-direction: column;
gap: 24rpx;
}
/* 单个卡片 */
/* Large Item (Calculator) */
.grid-item {
background-color: #ffffff;
border-radius: 28rpx;
padding: 32rpx;
display: flex;
align-items: center;
box-shadow: 0 12rpx 36rpx rgba(17, 97, 107, 0.20); /* Increased shadow opacity and size for better contrast */
position: relative;
border-radius: 24rpx;
overflow: hidden;
background: #fff;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
transition: transform 0.1s;
/* Reset old styles */
padding: 0;
align-items: normal;
}
.grid-item-hover {
transform: scale(0.97);
background-color: #EBF4F8; /* Color 03 hover */
transform: scale(0.98);
}
.item-large {
height: 200rpx;
width: 100%;
}
.grid-bg {
position: absolute;
top: 0;
right: 0;
width: 200rpx;
height: 100%;
opacity: 0.1;
transform: skewX(-20deg) translateX(40rpx);
z-index: 0;
}
.bg-blue { background: #007AFF; }
.bg-green { background: #34C759; }
.bg-orange { background: #FF9500; }
.grid-content {
position: relative;
z-index: 1;
display: flex;
align-items: center;
padding: 40rpx;
height: 100%;
box-sizing: border-box;
}
.icon-box {
width: 96rpx;
height: 96rpx;
border-radius: 24rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 28rpx;
flex-shrink: 0;
width: 88rpx;
height: 88rpx;
background: rgba(17, 97, 107, 0.1);
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 30rpx;
flex-shrink: 0;
}
.icon {
font-size: 46rpx;
color: #11616B; /* Icon color dark teal */
}
.bg-gradient-blue {
background: #EBF4F8; /* Color 03 */
}
.bg-gradient-pink {
background: #FED9CD; /* Color 04 */
}
.bg-gradient-green {
background: #7BBDB6; /* Color 02 */
}
.bg-gradient-orange {
background: #FED9CD; /* Color 04 */
}
.bg-gradient-purple {
background: #DC8B70; /* Color 05 */
font-size: 44rpx;
color: #11616B;
}
.text-box {
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
flex: 1;
display: flex;
flex-direction: column;
}
.label {
font-size: 32rpx;
color: #2d3436;
font-weight: 700;
margin-bottom: 6rpx;
font-size: 34rpx;
font-weight: bold;
color: #333;
margin-bottom: 8rpx;
}
.sub-label {
font-size: 23rpx;
color: #b2bec3;
font-weight: 500;
font-size: 24rpx;
color: #999;
}
/* Banner */
.banner {
margin-top: 30rpx;
background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
border-radius: 28rpx;
padding: 28rpx 36rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 12rpx 32rpx rgba(108, 92, 231, 0.3);
.arrow-btn {
padding: 8rpx 24rpx;
background: #F0F0F0;
border-radius: 30rpx;
font-size: 24rpx;
font-weight: bold;
color: #666;
}
.banner-text {
display: flex;
flex-direction: column;
/* Half Items Row */
.grid-row {
display: flex;
justify-content: space-between;
gap: 24rpx;
}
.banner-title {
color: #fff;
font-weight: 700;
font-size: 30rpx;
margin-bottom: 8rpx;
.item-half {
flex: 1;
height: 240rpx;
}
.banner-desc {
color: rgba(255,255,255,0.8);
font-size: 24rpx;
.grid-content.vertical {
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 30rpx;
}
.banner-icon {
font-size: 40rpx;
.icon-box-small {
font-size: 56rpx;
margin-bottom: 20rpx;
}
/* 箭头 */
.arrow-icon {
margin-left: auto;
font-size: 40rpx;
color: #ddd;
font-weight: 300;
flex-shrink: 0;
padding-left: 12rpx;
.sub-label-small {
font-size: 22rpx;
color: #999;
margin-top: 6rpx;
}
/* 功能亮点区 */
.feature-highlights {
margin-top: 24rpx;
background: #ffffff;
border-radius: 28rpx;
padding: 32rpx 36rpx;
box-shadow: 0 8rpx 32rpx rgba(108, 92, 231, 0.08);
/* System Entry */
.system-entry-row {
margin-top: 40rpx;
background: #fff;
padding: 30rpx 40rpx;
border-radius: 16rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02);
}
.highlight-title {
font-size: 28rpx;
font-weight: 700;
color: #2d3436;
margin-bottom: 20rpx;
letter-spacing: 1rpx;
.sys-label {
font-size: 30rpx;
color: #333;
}
.highlight-list {
display: flex;
flex-direction: column;
gap: 18rpx;
}
.highlight-item {
display: flex;
align-items: center;
gap: 14rpx;
font-size: 25rpx;
color: #636e72;
font-weight: 500;
}
.highlight-dot {
font-size: 14rpx;
color: #6c5ce7;
}
/* 列表容器 */
.list-container {
background-color: #ffffff;
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 4rpx 16rpx rgba(17, 97, 107, 0.08);
}
.list-item {
display: flex;
align-items: center;
padding: 30rpx;
background-color: #ffffff;
transition: background-color 0.1s;
.sys-right {
display: flex;
align-items: center;
color: #999;
font-size: 28rpx;
gap: 10rpx;
}
.list-item-hover {
background-color: #f9f9f9;
}
.list-icon-box {
width: 56rpx;
height: 56rpx;
background-color: #EBF4F8;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 24rpx;
}
.icon-small {
font-size: 32rpx;
}
.list-label {
flex: 1;
font-size: 30rpx;
color: #333;
font-weight: 500;
}
.section-title {
display: block !important; /* Ensure visibility */
font-size: 28rpx;
color: #999;
margin-bottom: 20rpx;
margin-left: 10rpx;
font-weight: 500;
background: #f9f9f9;
}