Refactor Date Calculator UI to Morandi theme and fix logic; fix Index page interaction

This commit is contained in:
2026-02-07 20:25:50 +08:00
parent a21716e772
commit 19c762b3fa
11 changed files with 1636 additions and 479 deletions

View File

@@ -3,7 +3,7 @@ page {
height: 100vh;
display: flex;
flex-direction: column;
background-color: #f6f7f9;
background-color: #f5f6fa;
}
.scrollarea {
flex: 1;
@@ -19,24 +19,39 @@ page {
.header-bg {
width: 100%;
height: 380rpx;
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
border-bottom-left-radius: 40rpx;
border-bottom-right-radius: 40rpx;
background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
border-bottom-left-radius: 48rpx;
border-bottom-right-radius: 48rpx;
padding: 40rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
/* 加上一点阴影 */
box-shadow: 0 10rpx 20rpx rgba(79, 172, 254, 0.2);
box-shadow: 0 12rpx 32rpx rgba(108, 92, 231, 0.25);
position: relative;
overflow: hidden;
}
.header-bg::after {
content: '';
position: absolute;
top: -80rpx;
right: -60rpx;
width: 240rpx;
height: 240rpx;
border-radius: 50%;
background: rgba(255,255,255,0.08);
pointer-events: none; /* Prevent blocking clicks */
}
.header-content {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center; /* 垂直居中 */
align-items: center;
margin-top: 20rpx;
height: 140rpx; /* 固定高度确保对齐 */
height: 140rpx;
position: relative; /* Ensure z-index works */
z-index: 2; /* Ensure it is above the background decoration */
}
.text-area {
@@ -46,148 +61,202 @@ page {
}
.greeting {
color: rgba(255, 255, 255, 0.9);
font-size: 28rpx;
color: rgba(255, 255, 255, 0.85);
font-size: 26rpx;
margin-bottom: 10rpx;
font-weight: 500;
}
.nickname {
color: #ffffff;
font-size: 48rpx;
font-weight: bold;
font-size: 44rpx;
font-weight: 700;
letter-spacing: 2rpx;
}
.avatar-wrapper {
padding: 6rpx;
background: rgba(255, 255, 255, 0.3);
padding: 4rpx;
background: rgba(255, 255, 255, 0.25);
border-radius: 50%;
}
.avatar {
width: 120rpx;
height: 120rpx;
width: 110rpx;
height: 110rpx;
border-radius: 50%;
background-color: #fff;
border: 4rpx solid #ffffff;
border: 3rpx solid #ffffff;
}
/* 主要内容区 */
.main-content {
flex: 1;
width: 100%;
padding: 0 30rpx;
padding: 0 28rpx;
box-sizing: border-box;
margin-top: -80rpx; /* 向上浮动覆盖 Header */
margin-top: -80rpx;
z-index: 10;
padding-bottom: 40rpx;
padding-bottom: 60rpx;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
font-weight: 700;
color: #2d3436;
margin-left: 10rpx;
margin-bottom: 20rpx;
display: none; /* 卡片式设计不需要标题也行,或保留 */
display: none;
}
/* 一行两列或三列的卡片 */
/* 卡片列表 */
.grid-container {
display: flex;
flex-direction: column; /* 垂直排列的卡片列表看起来更像菜单 */
gap: 24rpx;
flex-direction: column;
gap: 20rpx;
}
/* 单个卡片样式 */
/* 单个卡片 */
.grid-item {
background-color: #ffffff;
border-radius: 24rpx;
padding: 30rpx;
border-radius: 28rpx;
padding: 32rpx;
display: flex;
align-items: center;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
transition: all 0.2s ease;
box-shadow: 0 8rpx 32rpx rgba(108, 92, 231, 0.08);
}
.grid-item-hover {
transform: scale(0.98);
background-color: #fafafa;
transform: scale(0.97);
background-color: #f8f7ff;
}
.icon-box {
width: 100rpx;
height: 100rpx;
border-radius: 20rpx;
width: 96rpx;
height: 96rpx;
border-radius: 24rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 30rpx;
margin-right: 28rpx;
flex-shrink: 0;
}
.icon {
font-size: 50rpx;
font-size: 46rpx;
}
.bg-gradient-blue {
background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
background: linear-gradient(135deg, #e0e6ff 0%, #c7d2fe 100%);
}
.bg-gradient-pink {
background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 100%);
}
.bg-gradient-green {
background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
}
/* 替换为柔和的莫兰迪色或渐变 */
.bg-gradient-blue { background: #e3f2fd; color: #2196f3; }
.bg-gradient-green { background: #e8f5e9; color: #4caf50; }
.bg-gradient-orange { background: #fff3e0; color: #ff9800; }
.bg-gradient-purple { background: #f3e5f5; color: #9c27b0; }
.bg-gradient-pink { background: #ffebee; color: #e91e63; }
background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}
.bg-gradient-orange {
background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}
.bg-gradient-purple {
background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}
.text-box {
display: flex;
flex-direction: column;
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
}
.label {
font-size: 32rpx;
color: #333;
font-weight: 600;
color: #2d3436;
font-weight: 700;
margin-bottom: 6rpx;
}
.sub-label {
font-size: 24rpx;
color: #999;
font-size: 23rpx;
color: #b2bec3;
font-weight: 500;
}
/* Banner */
.banner {
margin-top: 40rpx;
background: linear-gradient(to right, #4facfe, #00f2fe);
border-radius: 24rpx;
padding: 30rpx 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 8rpx 20rpx rgba(79, 172, 254, 0.3);
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);
}
.banner-text {
display: flex;
flex-direction: column;
display: flex;
flex-direction: column;
}
.banner-title {
color: #fff;
font-weight: bold;
font-size: 30rpx;
margin-bottom: 8rpx;
color: #fff;
font-weight: 700;
font-size: 30rpx;
margin-bottom: 8rpx;
}
.banner-desc {
color: rgba(255,255,255,0.8);
font-size: 24rpx;
color: rgba(255,255,255,0.8);
font-size: 24rpx;
}
.banner-icon {
font-size: 40rpx;
font-size: 40rpx;
}
/* 箭头 */
.arrow-icon {
margin-left: auto;
font-size: 40rpx;
color: #ddd;
font-weight: 300;
flex-shrink: 0;
padding-left: 12rpx;
}
/* 功能亮点区 */
.feature-highlights {
margin-top: 24rpx;
background: #ffffff;
border-radius: 28rpx;
padding: 32rpx 36rpx;
box-shadow: 0 8rpx 32rpx rgba(108, 92, 231, 0.08);
}
.highlight-title {
font-size: 28rpx;
font-weight: 700;
color: #2d3436;
margin-bottom: 20rpx;
letter-spacing: 1rpx;
}
.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;
}