今日待办:勾选框换成墨绿线性图标 (v26100167)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<title>兜爸心选 · 孕育陪伴</title>
|
||||
<!-- V:26100166 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<!-- V:26100167 缓存版本标记:改 css/js 时同步 bump 该值(与 js/app.js 的 VER 同源),静态资源按 mtime 走 ETag 自动刷新 -->
|
||||
<link rel="stylesheet" href="mama-box.css">
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<!-- 共享助手:授权/跳商城/位置上报(分享卡片同步,见 docs/h5-auth-standard.md 第四节) -->
|
||||
|
||||
32
js/app.js
32
js/app.js
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26100166';
|
||||
var VER = '26100167';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
@@ -4379,6 +4379,30 @@
|
||||
[/档案/, '翻翻孕期档案', '把这周的变化记进档案里'],
|
||||
[/运动/, '做 10 分钟孕期运动', '散散步、拉伸一下,身体会轻松些'],
|
||||
];
|
||||
/* 今日待办前面的线性小图标(2026-10-02 用户:「把 logo 调到前面……跟背景的绿色协调,用线性的」)。
|
||||
不用各应用的彩色 logo(五颜六色压在薄荷绿卡上很花),统一画成 24 格、1.8 线宽、currentColor 的线稿,
|
||||
颜色由 CSS 给(墨绿),底是一块浅绿圆角方。按应用名关键词匹配,匹配不上用一支笔。 */
|
||||
const TD_ICO = [
|
||||
[/胎动/, '<path d="M10.5 21c-2.6 0-4-2-3.6-4.6l.6-3.6c.4-2.5 1.9-4.1 3.9-4.1 2.2 0 3.4 1.8 3 4.3l-.7 4.1c-.4 2.4-1.5 3.9-3.2 3.9z"/><circle cx="8.3" cy="4.8" r="1.4"/><circle cx="11.6" cy="3.9" r="1.2"/><circle cx="14.6" cy="4.7" r="1.1"/><circle cx="16.8" cy="6.6" r="1"/>'],
|
||||
[/宫缩/, '<path d="M3 13h3l2-5 3 10 3-12 2.5 7H21"/>'],
|
||||
[/体重/, '<rect x="4" y="4" width="16" height="16" rx="4"/><path d="M8.5 10a3.5 3.5 0 017 0z"/><path d="M12 10l1.4-2"/>'],
|
||||
[/血糖/, '<path d="M12 3.5s-5.5 6.2-5.5 10.2a5.5 5.5 0 0011 0C17.5 9.7 12 3.5 12 3.5z"/><path d="M9.8 14.2a2.3 2.3 0 002.2 2.1"/>'],
|
||||
[/血压|胎心/, '<path d="M12 19.5s-7.5-4.6-7.5-10A4.2 4.2 0 0112 7a4.2 4.2 0 017.5 2.5c0 5.4-7.5 10-7.5 10z"/><path d="M6 12h3l1.5-2.5 2 4 1.5-1.5H18"/>'],
|
||||
[/运动/, '<circle cx="13" cy="4.6" r="1.7"/><path d="M10 21l2-5.5-2.5-2.5 1.5-5 3.5 3 3 .5"/><path d="M8 11l2.5-3.5"/><path d="M14.5 21l-2.5-5.5"/>'],
|
||||
[/产检|孕检|日历/, '<rect x="4" y="5.5" width="16" height="14.5" rx="3"/><path d="M4 10h16M8.5 3.5v4M15.5 3.5v4"/><path d="M9 14.6l2 2 4-4"/>'],
|
||||
[/待产/, '<path d="M5.5 9h13l-1 11h-11z"/><path d="M9 9V7a3 3 0 016 0v2"/><path d="M12 16.6s-2.2-1.3-2.2-2.7a1.1 1.1 0 012.2-.3 1.1 1.1 0 012.2.3c0 1.4-2.2 2.7-2.2 2.7z"/>'],
|
||||
[/能不能吃|饮食|营养/, '<path d="M4 12h16a8 8 0 01-16 0z"/><path d="M9 8.5c0-1.5 1-1.8 1-3.2M13 8.5c0-1.5 1-1.8 1-3.2"/>'],
|
||||
[/能不能做/, '<circle cx="12" cy="12" r="8"/><path d="M9.8 9.6a2.3 2.3 0 114 1.6c-.9.7-1.8 1.1-1.8 2.3"/><path d="M12 16.4v.1"/>'],
|
||||
[/估重/, '<circle cx="12" cy="13" r="7"/><path d="M12 13l3-3"/><path d="M9 3.5h6"/>'],
|
||||
[/补水|补剂|喝水/, '<path d="M7 4h10l-1.3 15a2 2 0 01-2 1.8h-3.4a2 2 0 01-2-1.8z"/><path d="M7.6 10h8.8"/>'],
|
||||
[/起名/, '<path d="M5 19l3.5-1 9.8-9.8a1.8 1.8 0 00-2.5-2.5L6 15.5z"/><path d="M14.5 7l2.5 2.5"/>'],
|
||||
[/档案/, '<path d="M6 3.5h8l4 4V20H6z"/><path d="M14 3.5v4h4M9 12h6M9 15.5h6"/>'],
|
||||
];
|
||||
const TD_DEF = '<path d="M5 19l3.5-1 9.8-9.8a1.8 1.8 0 00-2.5-2.5L6 15.5z"/><path d="M14.5 7l2.5 2.5"/>';
|
||||
function todoIco(name) {
|
||||
for (const [re, svg] of TD_ICO) if (re.test(name)) return svg;
|
||||
return TD_DEF;
|
||||
}
|
||||
function todoLine(name) {
|
||||
for (const [re, t, d] of FP_TODO) if (re.test(name)) return [t, d];
|
||||
return ['用一下「' + name + '」', '花一分钟,给今天留个记录'];
|
||||
@@ -4402,12 +4426,10 @@
|
||||
const row = document.createElement(href ? 'button' : 'div');
|
||||
row.className = 'td-row' + (href ? ' ripple' : '');
|
||||
if (href) row.type = 'button';
|
||||
const logo = (app && (app.logo || app.icon)) || '';
|
||||
row.innerHTML = '<i class="td-box" aria-hidden="true"></i><span class="td-txt"><b></b><em></em></span>' +
|
||||
(logo ? '<img class="td-ico" alt="" loading="lazy">' : '') + (href ? '<span class="td-go">去完成</span>' : '');
|
||||
row.innerHTML = '<i class="td-li" aria-hidden="true"><svg viewBox="0 0 24 24">' + todoIco(name) + '</svg></i><span class="td-txt"><b></b><em></em></span>' +
|
||||
(href ? '<span class="td-go">去完成</span>' : '');
|
||||
row.querySelector('b').textContent = t;
|
||||
row.querySelector('em').textContent = d;
|
||||
if (logo) row.querySelector('img').src = logo;
|
||||
if (href) row.addEventListener('click', () => jumpApp(href, (app && app.identifier) || ident || ''));
|
||||
box.appendChild(row);
|
||||
});
|
||||
|
||||
@@ -3782,3 +3782,11 @@ a.skip:focus{left:16px;top:16px}
|
||||
.apps-grid .app.is-done::after{content:"";position:absolute;top:-3px;right:calc(50% - 33px);width:18px;height:18px;border-radius:50%;
|
||||
background:#5BB58A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;box-shadow:0 0 0 2px #FAF5F1}
|
||||
.apps-head.for-all{margin-top:22px}
|
||||
|
||||
/* 今日待办:前面的勾选框换成线性图标(墨绿线稿 + 浅薄荷底,和脚印卡的绿底同色系) */
|
||||
.td-li{flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;border-radius:11px;
|
||||
background:#E6F4EC;color:#2F8F68;box-shadow:inset 0 0 0 1px #CFE9DB}
|
||||
.td-li svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
|
||||
.td-row{gap:12px}
|
||||
.td-row:active .td-li{background:#D5EEE1}
|
||||
.td-li svg{width:22px;height:22px}
|
||||
|
||||
Reference in New Issue
Block a user