ac0db6118d
新增主题变量 (light + dark 两套): - --success-rgb / --danger / --danger-rgb (utils/theme.js) 全部硬编码 #XXX / rgba 颜色统一改主题变量: - progress-ring 加 trackColor prop,默认 #EEEEEE (canvas 不能直接读 CSS var,需要 caller 传字面颜色) - ui-modal sheet 背景 #FFFFFF → var(--card-bg), 加底部 padding 避开 Dock TabBar - ui-modal handle #DDD → var(--bg-soft) - ui-btn --danger 文字 #E53935 → var(--danger), 边框 rgba(229,57,53,...) → rgba(var(--danger-rgb),...) - calendar-heatmap 三个 #999/#333 文字色 → var(--text-secondary)/var(--text) - index picker: preset/custom input 背景 #F5F5F5 → var(--bg-soft), label #666 → var(--text-secondary) - index done-badge 绿色 → var(--success-rgb), pending-text #CCC → var(--text-secondary) - records empty/hint #CCC/#E0E0E0 → var(--text-secondary), danger 红 → var(--danger) - settings plan-editor-sheet 背景 #FFFFFF → var(--card-bg), avatar 背景, handle, editor-input, preview 全部跟进 - leaderboard 金/铜背景 #FFF7E6/#FFF1E6 → rgba 半透明 (dark mode 下不刺眼) Tab bar inactive 图标重新根据 dark mode 切换颜色 (#999999 light / #98989F dark) leaderboard.json 删除 backgroundColor: #F5F5F5 覆盖,让 theme.json 接管 故意保留: - 各 .wxss 中渐变按钮上的 #FFFFFF 文字色 - 排行榜金/铜文字色 #FA8C16/#D46B08 (视觉符号约定) - 各页 data 中 orange theme 默认值 (onShow 后被 themeMod 覆盖)
365 lines
5.9 KiB
Plaintext
365 lines
5.9 KiB
Plaintext
/* ---- greeting ---- */
|
|
.greeting-row {
|
|
padding: 16rpx 8rpx 24rpx;
|
|
animation: cardIn 0.4s ease both;
|
|
}
|
|
|
|
.greeting-text {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 8rpx;
|
|
}
|
|
|
|
.greeting-icon {
|
|
width: 44rpx;
|
|
height: 44rpx;
|
|
margin-right: 12rpx;
|
|
}
|
|
|
|
.greeting-title {
|
|
font-size: 40rpx;
|
|
font-weight: 700;
|
|
color: var(--text);
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.greeting-sub {
|
|
font-size: 26rpx;
|
|
color: var(--text-secondary);
|
|
margin-left: 60rpx;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* ---- header card ---- */
|
|
.header-card {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 4rpx 0;
|
|
}
|
|
|
|
.streak-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
min-width: 140rpx;
|
|
}
|
|
|
|
.streak-icon {
|
|
width: 44rpx;
|
|
height: 44rpx;
|
|
margin-bottom: 4rpx;
|
|
animation: float 2.5s ease-in-out infinite;
|
|
}
|
|
|
|
.streak-num {
|
|
font-size: 56rpx;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.streak-label {
|
|
font-size: 22rpx;
|
|
color: var(--text-secondary);
|
|
margin-top: 4rpx;
|
|
line-height: 1;
|
|
}
|
|
|
|
.divider {
|
|
width: 2rpx;
|
|
height: 80rpx;
|
|
background: var(--border);
|
|
margin: 0 28rpx;
|
|
}
|
|
|
|
.plan-info {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.plan-badge {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 16rpx;
|
|
}
|
|
|
|
.plan-badge-icon {
|
|
width: 28rpx;
|
|
height: 28rpx;
|
|
color: var(--primary);
|
|
margin-right: 8rpx;
|
|
}
|
|
|
|
.plan-badge-text {
|
|
font-size: 26rpx;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
line-height: 1;
|
|
}
|
|
|
|
.progress-bar-wrap {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.progress-bar {
|
|
width: 100%;
|
|
height: 8rpx;
|
|
background: var(--border);
|
|
border-radius: 4rpx;
|
|
overflow: visible;
|
|
margin-bottom: 8rpx;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, var(--primary), var(--primary-light));
|
|
border-radius: 4rpx;
|
|
transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
|
|
position: relative;
|
|
}
|
|
|
|
.progress-glow {
|
|
position: absolute;
|
|
right: -4rpx;
|
|
top: -4rpx;
|
|
width: 16rpx;
|
|
height: 16rpx;
|
|
background: var(--primary);
|
|
border-radius: 50%;
|
|
box-shadow: 0 0 10rpx var(--primary);
|
|
}
|
|
|
|
.progress-label {
|
|
font-size: 22rpx;
|
|
color: var(--text-secondary);
|
|
line-height: 1;
|
|
}
|
|
|
|
/* ---- target card ---- */
|
|
.target-section {
|
|
text-align: center;
|
|
}
|
|
|
|
.target-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 8rpx;
|
|
}
|
|
|
|
.target-header .section-title {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.section-icon {
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
margin-right: 8rpx;
|
|
}
|
|
|
|
.target-display {
|
|
margin: 20rpx 0;
|
|
}
|
|
|
|
.target-ring {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 200rpx;
|
|
height: 200rpx;
|
|
border-radius: 50%;
|
|
background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 0.02));
|
|
border: 4rpx solid rgba(var(--primary-rgb), 0.15);
|
|
margin-bottom: 16rpx;
|
|
}
|
|
|
|
.target-time {
|
|
font-size: 64rpx;
|
|
font-weight: 700;
|
|
color: var(--primary);
|
|
font-variant-numeric: tabular-nums;
|
|
line-height: 1;
|
|
}
|
|
|
|
.target-unit {
|
|
display: block;
|
|
font-size: 26rpx;
|
|
color: var(--text-secondary);
|
|
margin-top: 4rpx;
|
|
line-height: 1;
|
|
}
|
|
|
|
.today-status {
|
|
margin-top: 16rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8rpx;
|
|
}
|
|
|
|
.done-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
background: rgba(var(--success-rgb), 0.08);
|
|
padding: 10rpx 24rpx;
|
|
border-radius: 24rpx;
|
|
}
|
|
|
|
.done-icon {
|
|
width: 28rpx;
|
|
height: 28rpx;
|
|
margin-right: 6rpx;
|
|
}
|
|
|
|
.done-text {
|
|
font-size: 26rpx;
|
|
color: var(--success);
|
|
line-height: 1;
|
|
}
|
|
|
|
.pending-icon {
|
|
width: 28rpx;
|
|
height: 28rpx;
|
|
margin-right: 6rpx;
|
|
}
|
|
|
|
.pending-text {
|
|
font-size: 26rpx;
|
|
color: var(--text-secondary);
|
|
line-height: 1;
|
|
}
|
|
|
|
/* ---- action buttons ---- */
|
|
.action-buttons {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 24rpx;
|
|
margin: 8rpx 0 8rpx;
|
|
}
|
|
|
|
/* ---- tip card ---- */
|
|
.tip-card {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
padding: 24rpx 32rpx;
|
|
background: transparent;
|
|
border-radius: 20rpx;
|
|
}
|
|
|
|
.tip-icon {
|
|
width: 32rpx;
|
|
height: 32rpx;
|
|
margin-right: 12rpx;
|
|
flex-shrink: 0;
|
|
align-self: center;
|
|
}
|
|
|
|
.tip-text {
|
|
font-size: 28rpx;
|
|
color: var(--text-secondary);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* ---- picker ---- */
|
|
.picker-title {
|
|
font-size: 34rpx;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
display: block;
|
|
text-align: center;
|
|
margin-bottom: 32rpx;
|
|
}
|
|
|
|
.preset-grid {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 16rpx;
|
|
margin-bottom: 28rpx;
|
|
}
|
|
|
|
.preset-item {
|
|
flex: 0 0 calc(33.33% - 12rpx);
|
|
background: var(--bg-soft);
|
|
border-radius: 16rpx;
|
|
padding: 20rpx 0;
|
|
text-align: center;
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.preset-item:active {
|
|
transform: scale(0.94);
|
|
}
|
|
|
|
.preset-item.selected {
|
|
background: var(--primary-bg);
|
|
border: 2rpx solid var(--primary);
|
|
}
|
|
|
|
.preset-num {
|
|
font-size: 36rpx;
|
|
font-weight: 700;
|
|
color: var(--text);
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.preset-item.selected .preset-num {
|
|
color: var(--primary);
|
|
}
|
|
|
|
.preset-unit {
|
|
font-size: 20rpx;
|
|
color: var(--text-secondary);
|
|
margin-top: 2rpx;
|
|
line-height: 1;
|
|
}
|
|
|
|
.custom-input-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 28rpx;
|
|
}
|
|
|
|
.custom-label {
|
|
font-size: 28rpx;
|
|
color: var(--text-secondary);
|
|
line-height: 1;
|
|
}
|
|
|
|
.custom-input {
|
|
width: 160rpx;
|
|
height: 64rpx;
|
|
background: var(--bg-soft);
|
|
border-radius: 12rpx;
|
|
text-align: center;
|
|
font-size: 32rpx;
|
|
font-weight: 600;
|
|
color: var(--primary);
|
|
margin: 0 16rpx;
|
|
}
|
|
|
|
.picker-cancel {
|
|
display: block;
|
|
text-align: center;
|
|
font-size: 28rpx;
|
|
color: var(--text-secondary);
|
|
padding: 12rpx 0;
|
|
margin-top: 8rpx;
|
|
}
|
|
|
|
/* ---- 训练完成高亮 (3 秒后淡出) ---- */
|
|
.just-completed {
|
|
animation: justCompletedPulse 1s ease-in-out 2;
|
|
border: 4rpx solid var(--primary) !important;
|
|
box-shadow: 0 4rpx 24rpx rgba(var(--primary-rgb), 0.3) !important;
|
|
}
|
|
|
|
@keyframes justCompletedPulse {
|
|
0%, 100% { transform: scale(1); }
|
|
50% { transform: scale(1.02); }
|
|
}
|