孕期首页登记出生页:性别小标志改 SVG 几何居中(♂♀ 字形本身偏心)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26102103';
|
||||
var VER = '26102104';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
'.bf-fld input::placeholder{color:#B3C7B9;font-weight:500}' +
|
||||
'.bf-sexs{display:flex;gap:10px;padding:4px 0 16px}' +
|
||||
'.bf-sexs button{flex:1;border:1.5px solid #D7E8DD;background:#fff;border-radius:16px;padding:12px 0 10px;font-size:13.5px;color:#4A5F51;font-family:inherit;display:flex;flex-direction:column;align-items:center;gap:6px;transition:all .2s}' +
|
||||
'.bf-sexs button i{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:15px;font-weight:800;color:#fff}' +
|
||||
'.bf-sexs button i{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-style:normal;line-height:0}.bf-sexs button i svg{display:block;fill:none}' +
|
||||
'.bf-sexs .s-boy i{background:#6FA3DD}.bf-sexs .s-girl i{background:#F29BB5}.bf-sexs .s-unknown i{background:#BDCDC2}' +
|
||||
'.bf-sexs button.on{border-color:#3A7A52;background:#EAF5EE;color:#24372B;font-weight:700;box-shadow:0 4px 12px rgba(50,110,75,.18)}' +
|
||||
'.bf-sexs .s-girl.on{border-color:#E57FA0;background:#FDF0F4}' +
|
||||
@@ -148,6 +148,12 @@
|
||||
name: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#3A7A52" stroke-width="1.9" stroke-linecap="round"><path d="M12 20s-6.5-4-6.5-9.2A3.8 3.8 0 0 1 12 8.3a3.8 3.8 0 0 1 6.5 2.5C18.5 16 12 20 12 20z"/></svg>',
|
||||
sex: '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#3A7A52" stroke-width="1.9" stroke-linecap="round"><circle cx="12" cy="9" r="4.5"/><path d="M5.5 20c1.2-3.4 3.6-5 6.5-5s5.3 1.6 6.5 5"/></svg>'
|
||||
};
|
||||
/* 性别小标志用 SVG 画、按 24×24 几何居中(2026-10-21 用户:♂♀ 字符在圆里没居中——字体字形本身偏心) */
|
||||
var SEX = {
|
||||
boy: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="14" r="5.5"/><path d="M13.9 10.1L19.5 4.5M14.5 4.5h5v5"/></svg>',
|
||||
girl: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round"><circle cx="12" cy="8" r="5.5"/><path d="M12 13.5v8M8.5 18h7"/></svg>',
|
||||
unknown: '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M8.6 7.4a3.5 3.5 0 0 1 6.8 1.1c0 2.4-3.4 2.9-3.4 5"/><circle cx="12" cy="18" r=".6" fill="#fff"/></svg>'
|
||||
};
|
||||
function dateTxt(d) {
|
||||
var t = midnight(new Date()), n = Math.round((t - d) / 864e5);
|
||||
var tag = n === 0 ? '今天' : n === 1 ? '昨天' : n === 2 ? '前天' : '出生第 ' + (n + 1) + ' 天';
|
||||
@@ -167,7 +173,7 @@
|
||||
'<label class="bf-fld"><span class="bf-fi">' + ICO.name + '</span><span class="bf-fb"><span class="bf-fl">宝宝小名</span><input id="bfName" maxlength="12" placeholder="给宝宝起个小名吧" value="' + esc(S.babyName) + '"></span></label>' +
|
||||
'<div class="bf-fld" style="padding-bottom:6px"><span class="bf-fi">' + ICO.sex + '</span><span class="bf-fb"><span class="bf-fl">宝宝性别</span></span></div>' +
|
||||
'<div class="bf-sexs" id="bfSex">' +
|
||||
[['boy', '男孩', '♂'], ['girl', '女孩', '♀'], ['unknown', '先不说', '?']].map(function (p) { return '<button class="s-' + p[0] + (p[0] === sex ? ' on' : '') + '" data-sex="' + p[0] + '"><i>' + p[2] + '</i>' + p[1] + '</button>'; }).join('') +
|
||||
[['boy', '男孩', SEX.boy], ['girl', '女孩', SEX.girl], ['unknown', '先不说', SEX.unknown]].map(function (p) { return '<button class="s-' + p[0] + (p[0] === sex ? ' on' : '') + '" data-sex="' + p[0] + '"><i>' + p[2] + '</i>' + p[1] + '</button>'; }).join('') +
|
||||
'</div></div>' +
|
||||
'<div class="bf-tip"><svg width="14" height="14" viewBox="0 0 24 24" style="flex:none;margin-top:2px"><path d="M12 21s-7.5-4.6-7.5-10.6A4.4 4.4 0 0 1 12 7.6a4.4 4.4 0 0 1 7.5 2.8C19.5 16.4 12 21 12 21z" fill="#86C6A0"/></svg><span>只有出生日期必填,小名和性别以后在育儿首页「我的」里也能改。</span></div>' +
|
||||
'<div class="bf-err" id="bfErr"></div></div>' +
|
||||
|
||||
Reference in New Issue
Block a user