feat: Kinetic Dark 设计语言 + Lucide 图标迁移 + 首页轻量个性化

- 建立 Lucide 子集 iconfont(49 字形),全站 emoji 替换为 fc-icon 组件
- 重塑 Design Token(冷中性近黑底 + Volt 荧光绿 #B6F24E),消除硬编码颜色
- 首页登录后个性化:我的计划 / 我的收藏 / 今日推荐(纯前端复用现有 API)
- 后端 DEFAULT_EMOJI→Lucide 名,PALETTE 对齐 Kinetic Dark 语义色板
- 修复 person-standing 缺失字形;14 个官方组合 seed emoji 全部映射到现有字形
This commit is contained in:
2026-07-22 21:38:56 +08:00
parent ca0af6f7d2
commit b94eb706ff
64 changed files with 1572 additions and 173 deletions

View File

@@ -2,6 +2,7 @@ const app = getApp();
const planSvc = require('../../services/plan');
const favSvc = require('../../services/favorite');
const auth = require('../../utils/auth');
const { iconName } = require('../../utils/icon-name');
Page({
data: {
@@ -29,7 +30,7 @@ Page({
this.setData({ loading: true });
planSvc.officialExercises(this.data.slug, 1, 60).then((res) => {
this.setData({
collection: res.collection,
collection: { ...res.collection, icon: iconName(res.collection.emoji) },
exercises: (res && res.items) || [],
total: (res && res.total) || 0,
loading: false

View File

@@ -4,6 +4,7 @@
"navbar": "/components/navbar/index",
"exercise-card": "/components/exercise-card/index",
"section-header": "/components/section-header/index",
"level-tag": "/components/level-tag/index"
"level-tag": "/components/level-tag/index",
"fc-icon": "/components/fc-icon/index"
}
}

View File

@@ -2,7 +2,7 @@
<navbar title="{{collection.name}}" show-back />
<view class="header" style="background: linear-gradient(135deg, {{collection.color}}26, var(--surface));">
<view class="header__emoji" style="background: {{collection.color}}22; color: {{collection.color}};">{{collection.emoji}}</view>
<view class="header__emoji" style="background: {{collection.color}}22; color: {{collection.color}};"><fc-icon name="{{collection.icon}}" size="48" color="{{collection.color}}" /></view>
<view class="header__name" style="color: {{collection.color}};">{{collection.name}}</view>
<view wx:if="{{collection.nameEn}}" class="header__en">{{collection.nameEn}}</view>
<view class="header__desc">{{collection.description}}</view>
@@ -31,7 +31,8 @@
<view class="actionbar">
<view class="btn btn--ghost {{favorited ? 'btn--faved' : ''}}" bindtap="onToggleFav">
<text>{{favorited ? '♥ 已收藏' : '♡ 收藏'}}</text>
<fc-icon name="heart" size="28" color="{{favorited ? 'var(--accent)' : 'var(--text)'}}" />
<text>{{favorited ? '已收藏' : '收藏'}}</text>
</view>
<view class="btn btn--gold" bindtap="onImport">
<text> 导入我的计划</text>

View File

@@ -19,7 +19,7 @@
.actionbar {
position: fixed; left: 0; right: 0; bottom: 0;
display: flex; gap: 20rpx; padding: 20rpx 32rpx;
background: rgba(14,17,16,0.92);
background: var(--bar-bg);
backdrop-filter: blur(12px);
border-top: 1rpx solid var(--line);
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
@@ -28,6 +28,6 @@
flex: 1; display: flex; align-items: center; justify-content: center;
border-radius: 999rpx; padding: 26rpx; font-size: 30rpx; font-weight: 700;
}
.btn--gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%); color: #0E1110; }
.btn--gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%); color: var(--accent-on); }
.btn--ghost { background: var(--surface-2); color: var(--text); border: 1rpx solid var(--gold-line); }
.btn--faved { color: var(--gold-2); border-color: var(--gold); }