v24 第 2 轮:19 条清单收尾(附件预览/CalDAV/任务分类看板/全局选人/家谱/纪念日/财务)
用户 2026-10-02 提的 19 条需求,本轮完成剩下的 8 条 + CalDAV 服务端:
- ③ 附件:图片/视频给缩略图,PDF/Word/Excel 给**同尺寸**图标;可预览的在本页
弹层里看(不再新开标签页),渲染不了的点了直接下载;预览层右上角恒有下载按钮。
- ⑦b CalDAV:把「我的日历本」按 RFC 4791 只读子集分享出去(OPTIONS/PROPFIND/
REPORT/GET,写方法一律 403)。用**专用口令**(库里只存 sha256),不是登录口令。
- ⑨⑩ 任务:分类与看板都由用户自建;已完成的任务从看板消失,改在「已完成」页
按分类查看/搜索;设置入口在「新建任务」旁的 ☰。
- ⑪ 全局人员选择器:一个片段铺到观影/旅程/资源/日历共享/任务共享/财务共享;
修掉了老组件「名字和拼音都搜不动」的 bug —— .att-item 自己声明了 display:flex,
压过了浏览器 [hidden]{display:none},过滤根本没生效。
- ⑫ 家谱:头像改方形不再裁切;姻亲不在图上的卡片给「⇄ 姻亲」入口,
以 TA 为中心重画 + 「返回我的家谱」。
- ⑬ 纪念日:阴历/阳历都能设且按对应历法重复;名册里每个人的生日默认可见
(实时派生,不复制一份);全部作为全天日程进日历。
- ⑮ 财务:账本可共享,双方都能记账、都能看全部账目,资产−负债=净资产;
金额一律以「分」存,不用浮点。
验证:端到端 724 项通过 / 0 失败;几何 368、交互 97、移动端 516、家谱 24、
升级 123 全绿;SQL 列名静态校验 0 处可疑;部署 11 条线上探针全过。
This commit is contained in:
+311
-30
@@ -521,11 +521,28 @@ textarea.input { min-height: 76px; resize: vertical; }
|
||||
.kin-card:hover {
|
||||
box-shadow: var(--shadow-l); border-color: var(--brand-2); text-decoration: none;
|
||||
}
|
||||
/* ⚠️ v24 第 12 条:头像是**方形**、不裁切。
|
||||
卡片高度从 120 加到 136,把这块从 70 放大到 74×74 的正方形;
|
||||
object-fit 用 contain(不是 cover)—— cover 会把非正方形的头像切掉边,
|
||||
用户要的正是"所有人的头像都是方形的,别截断"。 */
|
||||
.kin-card {
|
||||
width: 148px; height: 138px;
|
||||
}
|
||||
.kin-card .kin-ph {
|
||||
width: 100%; height: 70px; border-radius: 7px; overflow: hidden;
|
||||
width: 74px; height: 74px; border-radius: 6px; overflow: hidden;
|
||||
background: #F1E7D6; flex: 0 0 auto;
|
||||
}
|
||||
.kin-card .kin-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.kin-card .kin-ph img {
|
||||
width: 100%; height: 100%; object-fit: contain; display: block;
|
||||
}
|
||||
/* 「⇄ 姻亲」:卡片右下角的小按钮(这一侧的人没画在本图上时才有) */
|
||||
.kin-card .kin-branch {
|
||||
position: absolute; right: 3px; bottom: 3px;
|
||||
font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 999px;
|
||||
background: var(--brand); color: #fff; cursor: pointer;
|
||||
box-shadow: 0 1px 3px rgba(43, 38, 32, .25);
|
||||
}
|
||||
.kin-card .kin-branch:hover { background: var(--brand-ink); }
|
||||
.kin-card .kin-nm {
|
||||
font-size: 12.5px; font-weight: 600; line-height: 1.25; max-width: 100%;
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
@@ -1148,6 +1165,13 @@ textarea.input { min-height: 76px; resize: vertical; }
|
||||
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
|
||||
.lb-btn[hidden] { display: none; }
|
||||
.lb-close { top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; }
|
||||
/* 下载按钮在关闭按钮左边,同高、同一套视觉(v24 第 3 条:预览层右上角要有下载) */
|
||||
.lb-dl {
|
||||
top: 14px; right: 66px; height: 40px; padding: 0 16px; border-radius: 20px;
|
||||
display: inline-flex; align-items: center; font-size: 13px; font-weight: 600;
|
||||
background: #fff; color: #1a1a1a; text-decoration: none;
|
||||
}
|
||||
.lb-dl:hover { background: #eee; }
|
||||
.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; font-size: 28px; padding-bottom: 4px; }
|
||||
.lb-prev { left: 14px; }
|
||||
.lb-next { right: 14px; }
|
||||
@@ -1205,54 +1229,217 @@ textarea.input { min-height: 76px; resize: vertical; }
|
||||
.stars-disp { display: inline-flex; gap: 1px; font-size: 17px; line-height: 1; vertical-align: -2px; }
|
||||
.stars-disp .d-on { color: #f5b301; }
|
||||
.stars-disp .d-off { color: #d3d7de; }
|
||||
/* ---- 同行观影人选择(v10):chips + 弹窗 + 拼音首字母联想(v11 起带头像) ---- */
|
||||
.att-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
|
||||
.att-chips:empty { display: none; }
|
||||
.att-chip {
|
||||
/* ---- 财务 / 账本(v24 第 15 条) ---- */
|
||||
/* 金额列右对齐 + 等宽数字(表格里数字不齐会很难扫) */
|
||||
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
|
||||
.table tfoot th { border-top: 2px solid var(--line); border-bottom: 0; color: var(--ink); }
|
||||
.led-sum-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
|
||||
.led-total { display: flex; flex-wrap: wrap; gap: 18px; margin: 12px 0 4px; }
|
||||
.led-total-item { display: flex; flex-direction: column; gap: 2px; }
|
||||
.led-total-lb { font-size: 12px; color: var(--muted); }
|
||||
.led-total-num {
|
||||
font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums;
|
||||
color: var(--ink);
|
||||
}
|
||||
.led-total-item.led-net .led-total-num { color: var(--brand); }
|
||||
/* 数字颜色:**收入/资产用红、负债用绿**(与 A 股涨红跌绿同一套约定,不要反) */
|
||||
.led-asset { color: #B0342C; }
|
||||
.led-debt { color: #1F7A4D; }
|
||||
.led-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
|
||||
.led-kind-chip {
|
||||
display: inline-flex; align-items: center; gap: 5px;
|
||||
padding: 3px 9px; border-radius: 999px; font-size: 12px;
|
||||
background: var(--line-2); color: var(--ink); white-space: nowrap;
|
||||
}
|
||||
.led-kind-chip b { font-variant-numeric: tabular-nums; }
|
||||
.led-kind-chip.is-debt { background: #E7F2EC; }
|
||||
.led-shares { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
|
||||
.led-share-chip {
|
||||
display: inline-flex; align-items: center; gap: 6px;
|
||||
padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px;
|
||||
}
|
||||
.led-ops { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
|
||||
.led-ops .inline-form { flex-wrap: wrap; align-items: center; }
|
||||
.led-ops .input { min-width: 140px; }
|
||||
.led-edit summary { cursor: pointer; }
|
||||
.led-edit .node-form { min-width: min(520px, 86vw); }
|
||||
/* ---- 纪念日(v24 第 13 条) ---- */
|
||||
.ann-up { list-style: none; margin: 0; padding: 0; }
|
||||
.ann-up-item {
|
||||
display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
|
||||
padding: 8px 2px; border-bottom: 1px solid var(--line-2); font-size: 14px;
|
||||
}
|
||||
.ann-up-item:last-child { border-bottom: 0; }
|
||||
.ann-days {
|
||||
flex: 0 0 auto; min-width: 62px; font-weight: 600; color: var(--brand);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.ann-date { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; }
|
||||
.ann-title { flex: 1 1 auto; color: var(--ink); min-width: 0; }
|
||||
.chk-inline { display: flex; align-items: center; gap: 6px; font-size: 14px; }
|
||||
/* ---- 任务设置(v24 第 9、10 条):看板/分类的增删改列表 ---- */
|
||||
.kb-boards { margin-bottom: 12px; }
|
||||
.set-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; }
|
||||
/* 一行 = 一个「改名」表单 + 一个「删除」表单,靠 flex 排成一条 */
|
||||
.set-row { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; margin: 0; }
|
||||
.set-row .input { flex: 1 1 auto; min-width: 0; }
|
||||
.set-tail { flex: 0 0 auto; }
|
||||
/* 「已完成」归档列表 */
|
||||
.done-list { list-style: none; margin: 0; padding: 0; }
|
||||
.done-item {
|
||||
display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
|
||||
padding: 9px 2px; border-bottom: 1px solid var(--line-2); font-size: 14px;
|
||||
}
|
||||
.done-item:last-child { border-bottom: 0; }
|
||||
.done-title { color: var(--ink); text-decoration: none; }
|
||||
.done-title:hover { color: var(--brand); text-decoration: underline; }
|
||||
/* ---- 附件缩略图墙 + 全局预览(v24 第 3 条) ----
|
||||
规则:图片/视频给缩略图,PDF/Word/Excel 给**同尺寸**图标;
|
||||
可预览的点开在本页这一层里看,不可预览的点了直接下载。 */
|
||||
.att-wall {
|
||||
display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 2px;
|
||||
}
|
||||
.att-cell { width: 132px; }
|
||||
/* ⚠️ 缩略图与文档图标**必须是同一个盒子**:用户要的是"图标跟预览图一样大小",
|
||||
所以尺寸只在这里写一次,图标靠 flex 撑满,不另给一套尺寸。 */
|
||||
.att-thumb {
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
width: 132px; height: 96px; border-radius: 8px; overflow: hidden;
|
||||
border: 1px solid var(--line); background: var(--line-2); position: relative;
|
||||
}
|
||||
.att-thumb:hover { border-color: var(--brand); }
|
||||
.att-thumb img, .att-thumb video {
|
||||
width: 100%; height: 100%; object-fit: cover; display: block;
|
||||
}
|
||||
.att-thumb video { object-fit: cover; pointer-events: none; }
|
||||
.att-play {
|
||||
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
||||
color: #fff; font-size: 22px; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); pointer-events: none;
|
||||
}
|
||||
.att-doc {
|
||||
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
||||
gap: 4px; width: 100%; height: 100%;
|
||||
font-size: 12px; font-weight: 700; letter-spacing: .5px; color: #fff;
|
||||
}
|
||||
.att-doc::before {
|
||||
content: ""; width: 34px; height: 34px; border-radius: 6px; background: rgba(255, 255, 255, .22);
|
||||
}
|
||||
.att-doc-pdf { background: #B0342C; }
|
||||
.att-doc-doc { background: #2C5AA0; }
|
||||
.att-doc-xls { background: #1F7A4D; }
|
||||
.att-doc-ppt { background: #B4622A; }
|
||||
.att-doc-text { background: #5F6672; }
|
||||
.att-doc-file { background: #5F6672; }
|
||||
.att-meta {
|
||||
display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px;
|
||||
margin-top: 4px; font-size: 12px; color: var(--muted);
|
||||
}
|
||||
.att-fname {
|
||||
flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
color: var(--ink);
|
||||
}
|
||||
.att-fsize { flex: 0 0 auto; }
|
||||
.att-meta form { display: inline; margin: 0; }
|
||||
/* ---- 全局预览层 ---- */
|
||||
.pv {
|
||||
position: fixed; inset: 0; z-index: 320; display: flex; flex-direction: column;
|
||||
background: rgba(0, 0, 0, .9); overscroll-behavior: contain;
|
||||
}
|
||||
/* ⚠️ .pv 自己声明了 display:flex,必须补这条,否则 preview.js 里的
|
||||
box.hidden = true 藏不住它(与 .pp-item 同一个坑)。 */
|
||||
.pv[hidden] { display: none; }
|
||||
.pv-head {
|
||||
flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
|
||||
padding: 12px 16px; color: #fff;
|
||||
}
|
||||
.pv-name {
|
||||
min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
font-size: 14px;
|
||||
}
|
||||
.pv-meta { flex: 0 0 auto; font-size: 12px; opacity: .7; }
|
||||
/* 下载按钮恒在右上角(用户第 3 条点名要求) */
|
||||
.pv-dl {
|
||||
margin-left: auto; flex: 0 0 auto; padding: 6px 14px; border-radius: 8px;
|
||||
background: #fff; color: #1a1a1a; font-size: 13px; font-weight: 600; text-decoration: none;
|
||||
}
|
||||
.pv-dl:hover { background: #eee; }
|
||||
.pv-close {
|
||||
flex: 0 0 auto; border: 0; background: rgba(255, 255, 255, .16); color: #fff;
|
||||
width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer;
|
||||
}
|
||||
.pv-close:hover { background: rgba(255, 255, 255, .28); }
|
||||
.pv-stage {
|
||||
flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center;
|
||||
padding: 0 16px 16px;
|
||||
}
|
||||
.pv-img {
|
||||
max-width: 92vw; max-height: 100%; width: auto; height: auto;
|
||||
object-fit: contain; border-radius: 8px;
|
||||
}
|
||||
.pv-video { max-width: 92vw; max-height: 100%; width: auto; height: auto; background: #000; }
|
||||
.pv-pdf {
|
||||
width: 92vw; height: 100%; border: 0; border-radius: 8px; background: #fff;
|
||||
}
|
||||
@media (max-width: 560px) {
|
||||
.att-cell, .att-thumb { width: 108px; }
|
||||
.att-thumb { height: 80px; }
|
||||
}
|
||||
/* ---- 全局人员选择器(v24 第 11 条):chips + 弹窗 + 拼音首字母联想 ----
|
||||
⚠️ .att-* 是这套组件早年在观影页的版本,已由 .pp-* 取代;
|
||||
保留只为历史样式,新页面一律用 _person_picker.php。 */
|
||||
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
|
||||
.pp-chip {
|
||||
display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 4px;
|
||||
border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
|
||||
font-size: 13px;
|
||||
}
|
||||
.att-chip img {
|
||||
.pp-chip img {
|
||||
width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
|
||||
background: #F1E7D6;
|
||||
}
|
||||
.att-chip .att-x {
|
||||
.pp-chip .pp-x {
|
||||
border: 0; background: none; color: var(--muted); font-size: 15px;
|
||||
line-height: 1; padding: 0 2px; cursor: pointer;
|
||||
}
|
||||
.att-chip .att-x:hover { color: #c0392b; }
|
||||
.att-modal {
|
||||
.pp-chip .pp-x:hover { color: #c0392b; }
|
||||
.pp-chip-empty { color: var(--muted); border-style: dashed; padding: 3px 10px; }
|
||||
.pp-modal {
|
||||
position: fixed; inset: 0; z-index: 60; display: flex; align-items: center;
|
||||
justify-content: center; background: rgba(0, 0, 0, .35); padding: 16px;
|
||||
}
|
||||
.att-modal[hidden] { display: none; }
|
||||
.att-modal-box {
|
||||
.pp-modal[hidden] { display: none; }
|
||||
.pp-modal-box {
|
||||
background: var(--surface); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
|
||||
width: min(420px, 100%); max-height: 70vh; display: flex; flex-direction: column;
|
||||
padding: 14px 16px; box-sizing: border-box;
|
||||
}
|
||||
.att-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
|
||||
.att-close {
|
||||
.pp-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
|
||||
.pp-close {
|
||||
border: 0; background: none; font-size: 20px; line-height: 1;
|
||||
color: var(--muted); cursor: pointer; padding: 2px 6px;
|
||||
}
|
||||
.att-modal-box .input { margin-bottom: 8px; }
|
||||
.att-list { overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
|
||||
.att-item {
|
||||
.pp-modal-box .input { margin-bottom: 8px; }
|
||||
.pp-list { overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
|
||||
.pp-item {
|
||||
display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
|
||||
border-bottom: 1px solid var(--line-2); font-size: 14px;
|
||||
}
|
||||
.att-item:last-child { border-bottom: 0; }
|
||||
.att-item:hover { background: var(--line-2); }
|
||||
.att-item input { accent-color: var(--brand); flex: 0 0 auto; }
|
||||
.att-item .att-av {
|
||||
/* ⚠️ 这条不能省:.pp-item 自己写了 display:flex,作者样式压过浏览器
|
||||
[hidden] { display:none },缺了它「过滤」就成了摆设 —— 名字和拼音都搜不动。
|
||||
弹窗 .pp-modal 同理(上面已有),凡是**自己声明了 display** 的元素要藏都得补一条。 */
|
||||
.pp-item[hidden] { display: none; }
|
||||
.pp-item:last-child { border-bottom: 0; }
|
||||
.pp-item:hover { background: var(--line-2); }
|
||||
.pp-item input { accent-color: var(--brand); flex: 0 0 auto; }
|
||||
.pp-item .pp-av {
|
||||
width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
|
||||
background: #F1E7D6;
|
||||
}
|
||||
.att-item .att-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.att-item .att-initials { margin-left: auto; color: var(--muted); font-size: 12px; }
|
||||
.att-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }
|
||||
.pp-item .pp-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.pp-item .pp-initials { margin-left: auto; color: var(--muted); font-size: 12px; }
|
||||
.pp-item-none .pp-name { color: var(--muted); }
|
||||
.pp-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }
|
||||
.pp-empty[hidden] { display: none; }
|
||||
/* ---- 豆瓣自动补充(v10):片名行 + 下拉候选 + 海报预览 ---- */
|
||||
.db-title-row { display: flex; gap: 8px; align-items: center; }
|
||||
.db-title-row .input { flex: 1 1 auto; }
|
||||
@@ -1764,20 +1951,114 @@ textarea.input { min-height: 76px; resize: vertical; }
|
||||
⚠️ 断点必须是 **720px**(站点既有的"窄屏留白 16px"断点),不能用 860:
|
||||
746px 宽时若只改顶栏留白,就会出现「顶栏 x=16、正文 x=24」错位 8px
|
||||
(几何检查会直接报出来)。窄屏规则只在站点真正切到小留白的那一档生效。 */
|
||||
/* ==================== 月 / 周 / 天 三选一的分段控件 ==================== */
|
||||
/* 三个按钮连成一条(相邻边各留一半边框,拼起来才是一整条外框),
|
||||
当前那个用模块主题色填底 —— 一眼看出自己在哪种看法上。 */
|
||||
.seg { display: inline-flex; }
|
||||
.seg-btn {
|
||||
padding: 6px 14px; font-size: 13px; line-height: 1;
|
||||
color: var(--muted); background: var(--surface);
|
||||
border: 1px solid var(--line); text-decoration: none;
|
||||
}
|
||||
.seg-btn + .seg-btn { border-left: 0; }
|
||||
.seg-btn:first-child { border-radius: var(--radius-s) 0 0 var(--radius-s); }
|
||||
.seg-btn:last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
|
||||
.seg-btn:hover { background: var(--surface-2, #FDFBF7); text-decoration: none; }
|
||||
.seg-btn.is-on {
|
||||
background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
|
||||
}
|
||||
|
||||
/* ==================== 周 / 天:按小时铺的时间网格 ==================== */
|
||||
/* 结构:左边一条"小时刻度"沟槽(tg-gutter),右边 N 个日期列(tg-col)。
|
||||
列高固定 = 24 小时 × 每小时 44px,日程块按 top/height 百分比**绝对定位**,
|
||||
所以"09:15 的 20 分钟"就是一小条,不会跟 9 点整的会挤成一样高。 */
|
||||
.cal-tg-card { padding: 0; overflow: auto; }
|
||||
.tg-head { display: flex; position: sticky; top: 0; z-index: 3;
|
||||
background: var(--surface); border-bottom: 1px solid var(--line); }
|
||||
.tg-gutter {
|
||||
flex: 0 0 56px; width: 56px; border-right: 1px solid var(--line);
|
||||
display: flex; flex-direction: column; align-items: flex-end;
|
||||
}
|
||||
.tg-dayname {
|
||||
flex: 1 1 0; min-width: 0; padding: 8px 6px; text-align: center;
|
||||
border-left: 1px solid var(--line-2);
|
||||
}
|
||||
.tg-dayname:first-of-type { border-left: 0; }
|
||||
.tg-dayname.is-today { background: #FDF6F1; }
|
||||
.tg-wd { display: block; font-size: 11px; color: var(--faint); }
|
||||
.tg-dd { display: block; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.tg-dayname.is-today .tg-dd { color: var(--brand); }
|
||||
|
||||
.tg-allday { display: flex; border-bottom: 1px solid var(--line); background: #FDFBF7; }
|
||||
.tg-allday .tg-gutter { padding: 6px 6px; }
|
||||
.tg-tag { font-size: 11px; color: var(--faint); }
|
||||
.tg-adcell {
|
||||
flex: 1 1 0; min-width: 0; padding: 4px 4px 6px; border-left: 1px solid var(--line-2);
|
||||
display: flex; flex-direction: column; gap: 3px;
|
||||
}
|
||||
.tg-adcell:first-of-type { border-left: 0; }
|
||||
|
||||
.tg-body { display: flex; position: relative; }
|
||||
.tg-hours { padding: 0; }
|
||||
.tg-hr {
|
||||
height: 44px; padding-right: 6px; padding-top: 2px;
|
||||
font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums;
|
||||
border-top: 1px solid var(--line-2); box-sizing: border-box;
|
||||
}
|
||||
.tg-hr:first-child { border-top: 0; }
|
||||
.tg-col {
|
||||
flex: 1 1 0; min-width: 0; position: relative;
|
||||
height: 1056px; /* 24 × 44px,与 .tg-hr 的高度必须一致 */
|
||||
border-left: 1px solid var(--line-2); box-sizing: border-box;
|
||||
}
|
||||
.tg-col:first-of-type { border-left: 0; }
|
||||
.tg-col.is-today { background: #FDF6F1; }
|
||||
.tg-line { display: block; height: 44px; border-top: 1px solid var(--line-2); box-sizing: border-box; }
|
||||
.tg-line:first-child { border-top: 0; }
|
||||
.tg-block {
|
||||
position: absolute; left: 2px; right: 2px;
|
||||
display: block; overflow: hidden; padding: 2px 5px;
|
||||
border-radius: 4px; color: #fff; font-size: 11px; line-height: 1.35;
|
||||
text-decoration: none; box-sizing: border-box;
|
||||
border: 1px solid rgba(255,255,255,.35);
|
||||
}
|
||||
.tg-block:hover { text-decoration: none; filter: brightness(1.1); z-index: 2; }
|
||||
.tg-block b { font-weight: 600; margin-right: 3px; }
|
||||
|
||||
/* 天视图只有一列,把列拉宽好读;周视图 7 列时列宽由 flex 平分 */
|
||||
@media (max-width: 720px) {
|
||||
/* 窄屏留不住 56px 的刻度沟槽 + 7 列,改成整体可横向滚动(.cal-tg-card 已 overflow:auto),
|
||||
给每列一个最小宽度,滚动着看而不是把字挤成一团。 */
|
||||
.tg-col, .tg-dayname, .tg-adcell { min-width: 92px; }
|
||||
.cal-tg-card { -webkit-overflow-scrolling: touch; }
|
||||
}
|
||||
|
||||
/* ⚠️ v24:导航从 7 个模块加到 9 个(纪念日 / 财务)之后,**746px 就放不下了**,
|
||||
而"放不下"的表现不是换行、是顶栏被撑宽 20.5px:
|
||||
`.nav` 内部产生横向滚动条(哪怕已用 scrollbar-width:none 隐藏),
|
||||
`.topbar-inner` 的可用宽度就比 `.container` 少一档,
|
||||
几何检查直接报「顶栏右 742.5 / 正文右 722.0」。
|
||||
所以**不能**只在 720px 断点里给 .nav 加快收缩 ——
|
||||
那样 721~1080 这一段区间没人管,正是出问题的地方。
|
||||
正确做法:把「导航可收缩 + 横向滚动」提到**无媒体查询的基态**,
|
||||
只在真的窄到需要缩留白时才改 padding(下面 720px 那段)。 */
|
||||
.nav {
|
||||
/* flex:1 1 auto + min-width:0 才真的会"被压缩";只写 min-width 时它仍是 auto 宽度,
|
||||
内容一多就把顶栏撑出去(这就是 746px 那 20.5px 的来源)。 */
|
||||
flex: 1 1 auto; min-width: 0;
|
||||
overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
|
||||
}
|
||||
.nav::-webkit-scrollbar { display: none; }
|
||||
.nav a { flex: 0 0 auto; }
|
||||
@media (max-width: 720px) {
|
||||
.topbar-inner { gap: 12px; padding: 0 16px; }
|
||||
/* min-width:0 是关键:flex 子项默认 min-width:auto,会拒绝被压缩,
|
||||
于是内部再 overflow-x 也撑不出滚动条,而是把父级一起顶宽。 */
|
||||
.nav {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
margin-left: 0;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
.nav::-webkit-scrollbar { display: none; } /* Chrome/Safari:藏掉滚动条,仍可滑 */
|
||||
.nav a { flex: 0 0 auto; padding: 6px 10px; }
|
||||
.nav a { padding: 6px 10px; }
|
||||
.topbar-right { margin-left: 0; gap: 6px; }
|
||||
/* 窄屏把「家书」两个字收起来,只留图标 —— 名字占的宽度正好够多放两个模块 */
|
||||
.brand span { display: none; }
|
||||
|
||||
Reference in New Issue
Block a user