feat(timer): 循环训练组进度改为圆环分段弧 + 信息气泡三行合一
- progress-ring 新增 sets/currentSet/resting/successColor 属性, 圆环外圈绘制分段弧(已完成=主色/当前=呼吸光点/休息下一组=绿),单组模式零渲染 - timer 删除顶部 circuit-bar 进度面板,布局骨架三模式统一 - 呼吸环淡化(描边 0.55→0.20,柔光渐变强度减半) - 目标卡与提示气泡合并为 info-bubble,状态文案(撑住/休息中/已暂停)并入气泡顶部
This commit is contained in:
+34
-43
@@ -3,6 +3,14 @@
|
||||
底部留大内边距给下方 quest-card 负 margin 上浮叠住。文字统一白色,图标用
|
||||
*White 变体(若有)。hero 用 opacity-only 动画,避免 transform 把 .container
|
||||
变成 containing block 而破坏弹窗定位(同 app.wxss pageIn 思路)。 */
|
||||
|
||||
/* index-page:仅本页面把 .container 升级为 flex 列,
|
||||
时钟区 flex:1 居中,操作按钮 margin-top:auto 贴底(不动全局 container)。 */
|
||||
.index-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.hero {
|
||||
margin: -24rpx -24rpx 0;
|
||||
padding: 24rpx 24rpx 72rpx;
|
||||
@@ -199,57 +207,41 @@
|
||||
100% { box-shadow: 0 0 0 4rpx rgba(var(--primary-rgb), 0); }
|
||||
}
|
||||
|
||||
/* ===== 计时环 dial ===== */
|
||||
/* ===== 今日目标时长(无圆环, 大字流光) =====
|
||||
在 index-page 这条 flex 列里 .timer-wrap 充当"中间时钟区":flex:1 占满
|
||||
hero+quest 与底部按钮之间的剩余高度,内部再垂直居中把"00:30 / 今日目标
|
||||
时长 / 预计消耗 千卡"这组文字真正落到屏幕中部(原来只是默认排在卡片下方) */
|
||||
.timer-wrap {
|
||||
text-align: center;
|
||||
margin: 32rpx 0 8rpx;
|
||||
}
|
||||
|
||||
.dial {
|
||||
width: 320rpx;
|
||||
height: 320rpx;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
background: radial-gradient(circle at 35% 30%, #ffffff, #f4f6f2 70%);
|
||||
box-shadow: inset 0 4rpx 14rpx rgba(var(--primary-rgb), 0.12), 0 10rpx 24rpx rgba(var(--primary-rgb), 0.12);
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
animation: ringBreathe 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* 虚线刻度环 */
|
||||
.dial::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 14rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx dashed rgba(var(--primary-rgb), 0.28);
|
||||
}
|
||||
|
||||
.dial-time {
|
||||
font-size: 84rpx;
|
||||
font-weight: 800;
|
||||
color: var(--primary);
|
||||
font-variant-numeric: tabular-nums;
|
||||
letter-spacing: -1rpx;
|
||||
line-height: 1;
|
||||
max-width: 280rpx;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.dial-label {
|
||||
font-size: 24rpx;
|
||||
.time-display {
|
||||
display: block;
|
||||
font-family: 'Saira Condensed', 'Arial Narrow', sans-serif;
|
||||
font-size: 200rpx;
|
||||
font-weight: 900;
|
||||
line-height: 1.1;
|
||||
letter-spacing: 6rpx;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--primary);
|
||||
text-shadow: 0 8rpx 6rpx rgba(var(--primary-rgb), 0.35);
|
||||
}
|
||||
|
||||
.time-label {
|
||||
display: block;
|
||||
font-size: 26rpx;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.benefit {
|
||||
margin-top: 20rpx;
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
@@ -260,17 +252,16 @@
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
@keyframes ringBreathe {
|
||||
0%, 100% { transform: scale(1); }
|
||||
50% { transform: scale(1.02); }
|
||||
}
|
||||
|
||||
/* ===== action buttons ===== */
|
||||
/* 在 index-page flex 列里,3 个按钮(rechallenge + free + circuit)靠
|
||||
margin-top:auto 推到列底、紧贴底部 toolbar 上方,与上方居中的时钟
|
||||
区之间自然留白;gap 保持按钮自身间距不变 */
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24rpx;
|
||||
margin: 8rpx 0 8rpx;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
/* 自由训练 / 循环训练 并排一行 */
|
||||
|
||||
Reference in New Issue
Block a user