// 临时生成脚本:富样式底部导航图标方案预览(勿提交) const fs = require('fs'); const path = 'js/data/sources/'; global.window = {}; const RED = '#C8102E'; const GRAY = '#999999'; function load(sid) { eval(fs.readFileSync(path + sid + '.js', 'utf8')); return window['HGB_Source_' + sid]; } function findIcon(data, ref) { const namePart = ref.includes(':') ? ref.split(':')[1] : ref; return (data.icons || []).find(i => i.id === ref || i.name === namePart) || null; } // 富样式源:全部 native(内容自带颜色 / currentColor),viewBox 24 const SOURCES = {}; ['twemoji', 'emojione', 'fluent-emoji', 'flat-color-icons', 'pixelarticons', 'gameicons'].forEach(sid => { SOURCES[sid] = {}; }); function renderSVG(ic) { return ''; } const SOLUTIONS = [ { key: 'G', title: 'Twemoji 多彩扁平表情', desc: 'Twitter 同款扁平表情,彩色生动、识别度高;未选中置灰、选中全彩;「发房」= 彩色铅笔', mode: 'color', source: 'twemoji', pub: 'twemoji:pencil', items: [ { label: '首页', n: 'twemoji:house', a: 'twemoji:house' }, { label: '租房', n: 'twemoji:magnifying-glass-tilted-left', a: 'twemoji:magnifying-glass-tilted-left' }, { label: '消息', n: 'twemoji:speech-balloon', a: 'twemoji:speech-balloon' }, { label: '我的', n: 'twemoji:bust-in-silhouette', a: 'twemoji:bust-in-silhouette' } ] }, { key: 'H', title: 'EmojiOne 3D 立体表情', desc: 'EmojiOne 3D 渲染表情,立体质感、色彩饱和;「发房」= 彩色铅笔', mode: 'color', source: 'emojione', pub: 'emojione:pencil', items: [ { label: '首页', n: 'emojione:house', a: 'emojione:house' }, { label: '租房', n: 'emojione:magnifying-glass-tilted-left', a: 'emojione:magnifying-glass-tilted-left' }, { label: '消息', n: 'emojione:speech-balloon', a: 'emojione:speech-balloon' }, { label: '我的', n: 'emojione:bust-in-silhouette', a: 'emojione:bust-in-silhouette' } ] }, { key: 'I', title: 'Fluent Emoji 微软 3D 卡通', desc: '微软 Fluent 3D 表情,圆润软萌、细节丰富;「发房」= 彩色铅笔', mode: 'color', source: 'fluent-emoji', pub: 'fluent-emoji:pencil', items: [ { label: '首页', n: 'fluent-emoji:house', a: 'fluent-emoji:house' }, { label: '租房', n: 'fluent-emoji:magnifying-glass-tilted-left', a: 'fluent-emoji:magnifying-glass-tilted-left' }, { label: '消息', n: 'fluent-emoji:speech-balloon', a: 'fluent-emoji:speech-balloon' }, { label: '我的', n: 'fluent-emoji:bust-in-silhouette', a: 'fluent-emoji:bust-in-silhouette' } ] }, { key: 'J', title: 'Flat Color Icons 多彩扁平', desc: '多彩半透明玻璃质感图标,商务活泼兼顾;「发房」= 彩色钥匙', mode: 'color', source: 'flat-color-icons', pub: 'flat-color-icons:key', items: [ { label: '首页', n: 'flat-color-icons:home', a: 'flat-color-icons:home' }, { label: '租房', n: 'flat-color-icons:search', a: 'flat-color-icons:search' }, { label: '消息', n: 'flat-color-icons:comments', a: 'flat-color-icons:comments' }, { label: '我的', n: 'flat-color-icons:businessman', a: 'flat-color-icons:businessman' } ] }, { key: 'K', title: 'Pixel 像素风', desc: '8-bit 像素图标,造型感强、辨识度高;「发房」= 红圆内置铅笔', mode: 'mono', source: 'pixelarticons', pub: 'pixelarticons:edit', items: [ { label: '首页', n: 'pixelarticons:home', a: 'pixelarticons:home' }, { label: '租房', n: 'pixelarticons:search', a: 'pixelarticons:search' }, { label: '消息', n: 'pixelarticons:message', a: 'pixelarticons:message' }, { label: '我的', n: 'pixelarticons:user', a: 'pixelarticons:user' } ] }, { key: 'L', title: 'Game Icons 游戏插画风', desc: '游戏插画质感、细节华丽,风格大胆独特;「发房」= 红圆内置羽毛笔', mode: 'mono', source: 'gameicons', pub: 'gameicons:quill-ink', items: [ { label: '首页', n: 'gameicons:house', a: 'gameicons:house' }, { label: '租房', n: 'gameicons:magnifying-glass', a: 'gameicons:magnifying-glass' }, { label: '消息', n: 'gameicons:chat-bubble', a: 'gameicons:chat-bubble' }, { label: '我的', n: 'gameicons:person', a: 'gameicons:person' } ] } ]; const dataCache = {}; for (const sid of Object.keys(SOURCES)) { try { dataCache[sid] = load(sid); } catch (e) { console.error('加载失败 ' + sid); process.exit(1); } } let cards = ''; const missList = []; // 发房按钮:单色方案=红圆白图标;彩色方案=大号彩色相机图标(带投影) function pubBtn(sol) { const ic = findIcon(dataCache[sol.source], sol.pub); if (!ic) { missList.push(sol.pub); return '
${ids}