From 8fd86749102f9c42e8493b2d2777eb9c36bc6fa8 Mon Sep 17 00:00:00 2001 From: Sakurasan <26715255+Sakurasan@users.noreply.github.com> Date: Thu, 24 Sep 2026 01:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=99=E7=99=BD=EF=BC=9A=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8C=89=20innei.in=20=E9=87=8D=E6=8E=92?= =?UTF-8?q?=E9=A2=98=E5=A4=B4=E4=B8=8E=E6=AD=A3=E6=96=87=20+=20=E9=A1=B6?= =?UTF-8?q?=E6=A0=8F=E5=AE=BD=E5=BA=A6=E7=BB=9F=E4=B8=80=20+=20=E7=BA=B8?= =?UTF-8?q?=E9=9D=A2=E7=95=99=E7=99=BD=E6=94=B6=E7=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 参考 innei.in 的文章页(它本身也用 yohaku 命名,把它的 CSS 拆出来对了值) 题头居中 - 元信息行 justify-content:center + tabular-nums(日期/字数等宽,换行不左右跳), 标题 text-align:center + text-wrap:balance(防居中标题折出「最后一行只落一两个字」); 正文仍回到左对齐,和参考一致 - 这几条都改成 > 直接子元素:原来的 .paper h1 会连正文里的 h1 一起命中 (有的文章正文就是从 `# 标题` 开始的),把正文标题也居中了——手机截图上一眼看到 正文 - 段距 0 0 1.35em -> 上下各 1.5em(参考 .v10dui0 .rich-paragraph),首末元素吃掉外边距 - 补设计稿漏掉的 h1 / h3 / ol / img / figcaption(h1 之前是浏览器默认 2em+.67em 外边距、 h3 是 1.17em,在 16.5px/1.95 的正文里很突兀;插图之前顶满整列且和文字紧贴) - 链接改用 text-decoration(1px、underline-offset 2px、hover 加粗 2px)替掉 border-bottom - 分隔线收成 60px 居中细线;.prose 加 text-autospace:normal(中英混排自动字距) 把 classic 的 .prose 挡回去 - styles.css 那段 .prose 不带 data-ui 前缀,vivid 也照样命中;我们的规则特指度更高, 但只覆盖自己声明过的属性,没声明的就漏过来。量出来并逐条认领: a 的 border-bottom(和新下划线叠成双线)、hr 的 height+background(细线被垫成 2px)、 h3::after(每条 h3 下方多一条 28×2 强调色横杠)、ul/ol 的 1.1em 下边距、 blockquote 末段 p、pre 的 1px 边框、h4(用 classic 的 16.5px 不成层级) - 首字下沉也在这批里:设计稿没有,是 classic 漏过来的固定 52px,参考站余白模式也有, 于是认领成自己的 2.4em(跟着正文字号缩放),短文按 classic 的分法关掉 顶栏宽度 - 撤掉上一版按 /post/* 放宽到 1340 的 .top-in.wide:从首页点进文章时导航会跳一下。 顶栏全站固定 1100,品牌与主题键在首页和文章页落在同一 x(实测 199 / 1207) 纸面与栅格收紧 - .paper padding 44/48/52 -> 30/24/40;--v-measure 680 -> 728;中列仍 776 = 728 + 24×2 (这三个数是一组,只改内边距会让正文在列里偏左:实测离左栏 83px、离右栏 131px) - .article-layout max-width 1340 -> 1272、padding 36/28/60 -> 24/24/44、gap 32 -> 24。 上限必须正好等于「三栏 + 两个 gap + 左右内边距」,声明的 gap 才是渲染出来的 gap: 180+776+220+24×2 = 1224 内容宽,+48 = 1272。否则 space-between 把富余塞回列间隙, 数字改小也不动(实测只改 pad/gap 数字,正文到侧栏反而 78 -> 86) - 手机 .article-layout padding 24/20/48 -> 20/20/40 实测(用列的实际位置反推,不信任声明值;正文宽度用 offsetWidth,.paper 有入场动画的 scale) - 1456:正文到侧栏 78 -> 48,正文 728 不变,布局 1340 -> 1272 - 1280:正文 697 -> 721;1200:617 -> 641;三档实际列间隙都等于声明的 24 - 公网 138.2.17.73:8080 产物 md5 与磁盘一致;npm run build 无警告 --- frontend/src/ui/yohaku/YohakuArticle.vue | 2 +- frontend/src/ui/yohaku/YohakuTop.vue | 8 +- frontend/src/ui/yohaku/article.css | 122 ++++++++++++++++++----- frontend/src/ui/yohaku/chrome.css | 5 - frontend/src/ui/yohaku/mobile.css | 4 +- frontend/src/ui/yohaku/tokens.css | 4 +- 6 files changed, 106 insertions(+), 39 deletions(-) diff --git a/frontend/src/ui/yohaku/YohakuArticle.vue b/frontend/src/ui/yohaku/YohakuArticle.vue index fdb5a71..665cbeb 100644 --- a/frontend/src/ui/yohaku/YohakuArticle.vue +++ b/frontend/src/ui/yohaku/YohakuArticle.vue @@ -165,7 +165,7 @@ function onTocClick(e) {

{{ title }}

-
+
{{ t }} diff --git a/frontend/src/ui/yohaku/YohakuTop.vue b/frontend/src/ui/yohaku/YohakuTop.vue index 2807272..d242ccc 100644 --- a/frontend/src/ui/yohaku/YohakuTop.vue +++ b/frontend/src/ui/yohaku/YohakuTop.vue @@ -1,5 +1,5 @@