diff --git a/content/site/pages.yaml b/content/site/pages.yaml index d8f2a8f..21aad11 100644 --- a/content/site/pages.yaml +++ b/content/site/pages.yaml @@ -1,21 +1,11 @@ -# 页面标题下的说明文案(瞬间 / 书架):文字、字号、颜色、字体都在这里改。 -# 缺省即回落内置默认,删字段不会破版。 -# 说明:color 取 tokens 里的灰阶层级(ink-1..ink-4);font 取排版类白名单里的字体类。 +# 页面标题下的说明文案(瞬间 / 书架):纯 markdown,后台「页面文案」直接改; +# 排版(字体/颜色)用内联类,与文章正文同一套(编辑器 Insert ▸ 排版 可视化选)。 +# 删字段即回落内置默认,不破版。 moments: - note: - zh: 零碎的记录:随手拍、一句话感想、开源动态。 - en: 'Fragmented notes: casual shots, one-liners, and open-source updates.' - style: - size: 13 - color: ink-4 - font: font-sans + note_zh: 零碎的记录:随手拍、一句话感想、开源动态。 + note_en: 'Fragmented notes: casual shots, one-liners, and open-source updates.' books: - note: - zh: 点一行展开封面与简介 · 置顶的书默认展开 - en: 'Tap a row for the cover and blurb · pinned books start open' - style: - size: 13 - color: ink-4 - font: font-sans # 与改造前一致;想用楷体改成 font-kai + note_zh: 点一行展开封面与简介 · 置顶的书默认展开 + note_en: 'Tap a row for the cover and blurb · pinned books start open' diff --git a/public/admin/config.yml b/public/admin/config.yml index 2223829..8bf0b6b 100644 --- a/public/admin/config.yml +++ b/public/admin/config.yml @@ -154,69 +154,22 @@ collections: label: 瞬间 / 书架 标题下的说明 file: content/site/pages.yaml format: yaml - hint: 这两页大标题下面那一行字,文字与样式都在这里改 + hint: 这两页大标题下面那一行字的文字;字体/颜色用编辑器 Insert ▸ 排版 内联标注(预览直接可见) fields: - - label: 瞬间页 + - label: 瞬间页说明 name: moments widget: object required: false fields: - - label: 说明文字 - name: note - widget: object - required: false - hint: 支持 markdown 与排版类(字体/颜色) - fields: - - { label: 中文, name: zh, widget: markdown, required: false } - - { label: English, name: en, widget: markdown, required: false } - - label: 样式 - name: style - widget: object - required: false - hint: 留空用全站默认;越界值会被自动夹取(不会破版) - fields: - - { label: 字号(px,11–16), name: size, widget: number, required: false, value_type: int, min: 11, max: 16 } - - label: 颜色 - name: color - widget: select - required: false - hint: 只开放灰阶层级,避免正文被染色 - options: [ink-1, ink-2, ink-3, ink-4] - - label: 字体 - name: font - widget: select - required: false - options: [font-sans, font-serif, font-kai, font-huiwen, font-kuaile, font-xiaowei, font-huangyou, font-mashanzheng, font-liujianmaocao, font-smiley, font-neoxihei] - - label: 书架页 + - { label: 中文, name: note_zh, widget: markdown, required: false, hint: '一行小字;排版(字体/颜色)选中文字 → Insert ▸ 排版' } + - { label: English, name: note_en, widget: markdown, required: false } + - label: 书架页说明 name: books widget: object required: false fields: - - label: 说明文字 - name: note - widget: object - required: false - hint: 支持 markdown 与排版类(字体/颜色) - fields: - - { label: 中文, name: zh, widget: markdown, required: false } - - { label: English, name: en, widget: markdown, required: false } - - label: 样式 - name: style - widget: object - required: false - hint: 留空用全站默认;越界值会被自动夹取(不会破版) - fields: - - { label: 字号(px,11–16), name: size, widget: number, required: false, value_type: int, min: 11, max: 16 } - - label: 颜色 - name: color - widget: select - required: false - options: [ink-1, ink-2, ink-3, ink-4] - - label: 字体 - name: font - widget: select - required: false - options: [font-sans, font-serif, font-kai, font-huiwen, font-kuaile, font-xiaowei, font-huangyou, font-mashanzheng, font-liujianmaocao, font-smiley, font-neoxihei] + - { label: 中文, name: note_zh, widget: markdown, required: false, hint: '一行小字;排版(字体/颜色)选中文字 → Insert ▸ 排版' } + - { label: English, name: note_en, widget: markdown, required: false } - name: home label: 主页设置 file: content/site/home.yaml @@ -309,9 +262,12 @@ collections: hint: '留空 = 内置渐变占位;上传后自动优化为 60px WebP' - label: 站点图标 favicon name: favicon - widget: string + widget: image required: false - hint: 'public 下的路径,如 /icons/my.ico 或 /icons/my.svg;留空回退 /favicon.svg。经「图标」媒体库上传' + # media_folder 按 file 集合语义相对 content/site/ 解析(写 content/site/assets 会嵌套翻倍——5l 实测教训) + media_folder: ../../public/icons + public_folder: /icons + hint: '直接上传 .svg/.ico/.png(建议 64–512px 方图);留空回退 /favicon.svg' - label: 社交链接(顺序即展示顺序) name: socials widget: list diff --git a/src/components/pages/BooksPage.astro b/src/components/pages/BooksPage.astro index 0ae5b84..1130d1f 100644 --- a/src/components/pages/BooksPage.astro +++ b/src/components/pages/BooksPage.astro @@ -78,7 +78,7 @@ const L = { {pinnedCount > 0 && {pinnedCount} {L.pinned}} -

+