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

@@ -0,0 +1,53 @@
// AUTO-GENERATED by /tmp/gen_iconfont.mjs — 勿手改
// Lucide (MIT) 子集 iconfontfont-family: fc-icon
module.exports = {
"zap": "\\uf101",
"x-circle": "\\uf102",
"user": "\\uf103",
"trophy": "\\uf104",
"trending-up": "\\uf105",
"trash-2": "\\uf106",
"target": "\\uf107",
"star": "\\uf108",
"sparkles": "\\uf109",
"sliders-horizontal": "\\uf10a",
"share-2": "\\uf10b",
"settings": "\\uf10c",
"search": "\\uf10d",
"rotate-cw": "\\uf10e",
"refresh-cw": "\\uf10f",
"plus": "\\uf110",
"play": "\\uf111",
"person-standing": "\\uf112",
"medal": "\\uf113",
"log-out": "\\uf114",
"layout-grid": "\\uf115",
"layers": "\\uf116",
"info": "\\uf117",
"image": "\\uf118",
"home": "\\uf119",
"heart": "\\uf11a",
"grid-2x2": "\\uf11b",
"folder-open": "\\uf11c",
"flame": "\\uf11d",
"filter": "\\uf11e",
"dumbbell": "\\uf11f",
"download": "\\uf120",
"clock": "\\uf121",
"clipboard-list": "\\uf122",
"circle-x": "\\uf123",
"chevron-right": "\\uf124",
"chevron-down": "\\uf125",
"check": "\\uf126",
"check-circle": "\\uf127",
"calendar": "\\uf128",
"bookmark": "\\uf129",
"bike": "\\uf12a",
"bell": "\\uf12b",
"award": "\\uf12c",
"arrow-right": "\\uf12d",
"arrow-left": "\\uf12e",
"alert-circle": "\\uf12f",
"activity": "\\uf130",
"accessibility": "\\uf131"
};

View File

@@ -0,0 +1,19 @@
// emoji → Lucide 图标名 映射(后端历史数据里仍可能带 emoji 的字段,如 plan.emoji / collection.emoji
const EMOJI_TO_ICON = {
'✨': 'sparkles', '💪': 'accessibility', '🏋️': 'dumbbell', '📋': 'clipboard-list',
'🗂️': 'folder-open', '👤': 'user', '🏃': 'person-standing', '🔥': 'flame',
'❤️': 'heart', '⭐': 'star', '🎯': 'target', '🧘': 'activity', '🥗': 'activity',
'🏠': 'home', '📚': 'layout-grid', '📝': 'clipboard-list', '💡': 'sparkles',
'🚀': 'trending-up', '⏱️': 'clock', '🏆': 'trophy', '🥇': 'medal',
// 官方训练组合 seed emoji后端 collections.ts→ 全部映射到现有字形
'⚡': 'zap', '🌟': 'star', '🌱': 'trending-up', '🌸': 'sparkles',
'📈': 'trending-up', '🦵': 'dumbbell', '🦾': 'dumbbell', '🪢': 'activity'
};
// 旧 emoji → lucide 名;已是 lucide 名则直接透传;未知返回 fallback
function iconName(v, fallback) {
if (!v) return fallback || 'folder-open';
return EMOJI_TO_ICON[v] || v;
}
module.exports = { EMOJI_TO_ICON, iconName };