feat: support PostScript names for fonts
This commit is contained in:
+214
-167
@@ -4,8 +4,45 @@ metadata:
|
|||||||
name: theme-terminal-ez-setting
|
name: theme-terminal-ez-setting
|
||||||
spec:
|
spec:
|
||||||
forms:
|
forms:
|
||||||
- group: basic
|
- group: general
|
||||||
label: 基本设置
|
label: 通用设置
|
||||||
|
formSchema:
|
||||||
|
- $formkit: select
|
||||||
|
name: time_style
|
||||||
|
id: time_style
|
||||||
|
label: 时间格式
|
||||||
|
value: "yyyy-MM-dd"
|
||||||
|
help: 控制文章发布时间的显示格式
|
||||||
|
options:
|
||||||
|
- label: "yyyy-MM-ddTHH:mm:ssXXX"
|
||||||
|
value: "yyyy-MM-dd''T''HH:mm:ssXXX"
|
||||||
|
- label: "yyyy-MM-dd HH:mm:ss"
|
||||||
|
value: "yyyy-MM-dd'' ''HH:mm:ss"
|
||||||
|
- label: "yyyy-MM-dd"
|
||||||
|
value: "yyyy-MM-dd"
|
||||||
|
- label: "custom"
|
||||||
|
value: "custom"
|
||||||
|
- $formkit: text
|
||||||
|
if: "$get(time_style).value === 'custom'"
|
||||||
|
key: custom-time-style
|
||||||
|
name: custom_time_style
|
||||||
|
label: 自定义时间格式
|
||||||
|
placeholder: "yyyy-MM-dd"
|
||||||
|
validation: "required"
|
||||||
|
- $formkit: number
|
||||||
|
name: prefer_ttl
|
||||||
|
label: 访客偏好有效期 (小时)
|
||||||
|
value: 24
|
||||||
|
min: 0
|
||||||
|
validation: "number|min:0"
|
||||||
|
help: 访客手动选择的模式, 配色和像素风格过期后会在下次访问时恢复默认值, 设为 0 表示永久保存
|
||||||
|
- $formkit: checkbox
|
||||||
|
name: pjax_enable
|
||||||
|
label: 启用 PJAX
|
||||||
|
help: 开启后点击站内链接时只更新主要内容区域而不是整个页面 (可能与一些插件存在兼容问题)
|
||||||
|
value: false
|
||||||
|
- group: header
|
||||||
|
label: 页头
|
||||||
formSchema:
|
formSchema:
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
label: logo
|
label: logo
|
||||||
@@ -13,12 +50,27 @@ spec:
|
|||||||
value:
|
value:
|
||||||
help: 设置左上角 logo 文本, 不设置默认为 halo 中设置的站点标题
|
help: 设置左上角 logo 文本, 不设置默认为 halo 中设置的站点标题
|
||||||
- $formkit: checkbox
|
- $formkit: checkbox
|
||||||
name: pjax_enable
|
name: search_button_enable
|
||||||
label: 启用 PJAX
|
label: 展示搜索按钮
|
||||||
help: 开启后点击站内链接时只更新主要内容区域而不是整个页面 (可能与一些插件存在兼容问题)
|
value: true
|
||||||
|
help: 搜索组件插件可用时在页头展示搜索按钮
|
||||||
|
- $formkit: checkbox
|
||||||
|
name: color_scheme_switcher_enable
|
||||||
|
label: 展示配色切换按钮
|
||||||
value: false
|
value: false
|
||||||
- group: style
|
help: 在页头展示配色选择下拉框
|
||||||
label: 全局样式
|
- $formkit: checkbox
|
||||||
|
name: appearance_switcher_enable
|
||||||
|
label: 展示深浅切换按钮
|
||||||
|
value: true
|
||||||
|
help: 在页头展示浅色, 深色和跟随系统三态切换按钮
|
||||||
|
- $formkit: checkbox
|
||||||
|
name: pixel_style_switcher_enable
|
||||||
|
label: 展示像素化按钮
|
||||||
|
value: true
|
||||||
|
help: 在页头展示像素风格切换按钮
|
||||||
|
- group: typography
|
||||||
|
label: 字体与排版
|
||||||
formSchema:
|
formSchema:
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
label: 默认字体
|
label: 默认字体
|
||||||
@@ -33,50 +85,21 @@ spec:
|
|||||||
value: "Hack"
|
value: "Hack"
|
||||||
- label: "Fira Code"
|
- label: "Fira Code"
|
||||||
value: "Fira Code"
|
value: "Fira Code"
|
||||||
- $formkit: checkbox
|
|
||||||
label: 启用全屏布局
|
|
||||||
name: fullscreen_layout
|
|
||||||
value: false
|
|
||||||
help: 开启后让正文区域占满可用宽度
|
|
||||||
- $formkit: checkbox
|
|
||||||
label: 表格宽度铺满父元素
|
|
||||||
name: table_full_width
|
|
||||||
value: false
|
|
||||||
help: 开启后文章内容中的 table 会占满正文内容区域宽度
|
|
||||||
- $formkit: checkbox
|
|
||||||
name: pixel_style
|
|
||||||
label: 默认像素化风格
|
|
||||||
value: false
|
|
||||||
help: 开启后将默认使用像素风格字体及图标
|
|
||||||
- $formkit: checkbox
|
|
||||||
name: search_button_enable
|
|
||||||
label: 展示搜索按钮
|
|
||||||
value: true
|
|
||||||
help: 搜索组件插件可用时在页头展示搜索按钮
|
|
||||||
- $formkit: checkbox
|
|
||||||
name: appearance_switcher_enable
|
|
||||||
label: 展示深浅切换按钮
|
|
||||||
value: true
|
|
||||||
help: 在页头展示浅色, 深色和跟随系统三态切换按钮
|
|
||||||
- $formkit: checkbox
|
|
||||||
name: pixel_style_switcher_enable
|
|
||||||
label: 展示像素化按钮
|
|
||||||
value: true
|
|
||||||
help: 在页头展示像素风格切换按钮
|
|
||||||
- $formkit: checkbox
|
- $formkit: checkbox
|
||||||
name: custom_font_enable
|
name: custom_font_enable
|
||||||
id: custom_font_enable
|
id: custom_font_enable
|
||||||
label: 启用自定义字体
|
label: 启用自定义字体
|
||||||
value: false
|
value: false
|
||||||
help: 可以添加多个字体, 优先级从上倒下组成 fallback
|
help: 可以添加多个字体, 优先级从上到下组成 fallback
|
||||||
- $formkit: array
|
- $formkit: array
|
||||||
if: "$get(custom_font_enable).value === true"
|
if: "$get(custom_font_enable).value === true"
|
||||||
|
key: custom-fonts
|
||||||
name: custom_fonts
|
name: custom_fonts
|
||||||
label: 自定义字体
|
label: 自定义字体
|
||||||
value: [ ]
|
value: [ ]
|
||||||
itemLabels:
|
itemLabels:
|
||||||
- type: "text"
|
- type: "text"
|
||||||
label: "$value.name"
|
label: "$value.family_name"
|
||||||
- type: "text"
|
- type: "text"
|
||||||
label: "$value.file"
|
label: "$value.file"
|
||||||
children:
|
children:
|
||||||
@@ -114,14 +137,16 @@ spec:
|
|||||||
name: advanced
|
name: advanced
|
||||||
label: 高级设置
|
label: 高级设置
|
||||||
value: false
|
value: false
|
||||||
help: "等同于直接写 css. 参考文档: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@font-face)"
|
help: "等同于直接写 css. 参考文档: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@font-face"
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-weight
|
||||||
name: weight
|
name: weight
|
||||||
label: 字重
|
label: 字重
|
||||||
value: "400"
|
value: "400"
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-style
|
||||||
name: style
|
name: style
|
||||||
label: 字体样式
|
label: 字体样式
|
||||||
value: normal
|
value: normal
|
||||||
@@ -140,16 +165,19 @@ spec:
|
|||||||
value: right
|
value: right
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-unicode-range
|
||||||
name: unicode_range
|
name: unicode_range
|
||||||
label: Unicode 范围
|
label: Unicode 范围
|
||||||
value: ""
|
value: ""
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-width
|
||||||
name: width
|
name: width
|
||||||
label: 字体宽度
|
label: 字体宽度
|
||||||
value: "auto"
|
value: "auto"
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-display
|
||||||
name: display
|
name: display
|
||||||
label: 字体显示策略
|
label: 字体显示策略
|
||||||
value: swap
|
value: swap
|
||||||
@@ -166,44 +194,96 @@ spec:
|
|||||||
value: optional
|
value: optional
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-feature-settings
|
||||||
name: feature_settings
|
name: feature_settings
|
||||||
label: OpenType 特性
|
label: OpenType 特性
|
||||||
value: "normal"
|
value: "normal"
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-variation-settings
|
||||||
name: variation_settings
|
name: variation_settings
|
||||||
label: 可变字体轴
|
label: 可变字体轴
|
||||||
value: "normal"
|
value: "normal"
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-size-adjust
|
||||||
name: size_adjust
|
name: size_adjust
|
||||||
label: 字体尺寸调整
|
label: 字体尺寸调整
|
||||||
value: "100%"
|
value: "100%"
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-ascent-override
|
||||||
name: ascent_override
|
name: ascent_override
|
||||||
label: 上升高度覆盖
|
label: 上升高度覆盖
|
||||||
value: "normal"
|
value: "normal"
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-descent-override
|
||||||
name: descent_override
|
name: descent_override
|
||||||
label: 下降高度覆盖
|
label: 下降高度覆盖
|
||||||
value: "normal"
|
value: "normal"
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: custom-font-line-gap-override
|
||||||
name: line_gap_override
|
name: line_gap_override
|
||||||
label: 行间隙覆盖
|
label: 行间隙覆盖
|
||||||
value: "normal"
|
value: "normal"
|
||||||
|
- $formkit: text
|
||||||
|
label: 基础字体大小
|
||||||
|
name: font_size
|
||||||
|
value:
|
||||||
|
placeholder: "1rem"
|
||||||
|
help: 控制全站基础字体大小, 例如 16px / 1rem / 18px
|
||||||
|
- $formkit: text
|
||||||
|
label: 基础行高
|
||||||
|
name: line_height
|
||||||
|
value:
|
||||||
|
placeholder: "calc(var(--size-theme-font) * 1.8)"
|
||||||
|
help: 控制全站基础行高, 例如 1.8 / 28px / calc(var(--size-theme-font) * 1.8)
|
||||||
|
- $formkit: text
|
||||||
|
label: 文章段落间距
|
||||||
|
name: post_paragraph_spacing
|
||||||
|
value:
|
||||||
|
placeholder: "calc(var(--size-theme-font) * 1.5625)"
|
||||||
|
help: 控制文章正文段落的上下间距, 例如 1.5rem / 24px / calc(var(--size-theme-font) * 1.5)
|
||||||
|
- group: layout
|
||||||
|
label: 布局
|
||||||
|
formSchema:
|
||||||
- $formkit: checkbox
|
- $formkit: checkbox
|
||||||
name: color_scheme_switcher_enable
|
label: 启用全屏布局
|
||||||
label: 启用访客配色切换
|
name: fullscreen_layout
|
||||||
value: false
|
value: false
|
||||||
help: 开启后在页头显示配色选择下拉框
|
help: 开启后让正文区域占满可用宽度
|
||||||
|
- $formkit: checkbox
|
||||||
|
label: 表格宽度铺满父元素
|
||||||
|
name: table_full_width
|
||||||
|
value: false
|
||||||
|
help: 开启后文章内容中的 table 会占满正文内容区域宽度
|
||||||
|
- $formkit: text
|
||||||
|
label: 正文区域最大宽度
|
||||||
|
name: max_width
|
||||||
|
value:
|
||||||
|
help: 控制正文区域最大宽度, 例如 960px / 80vw
|
||||||
|
- $formkit: text
|
||||||
|
label: 正文区域内边距
|
||||||
|
name: content_padding
|
||||||
|
value:
|
||||||
|
placeholder: "calc(var(--size-theme-font) * 2.5)"
|
||||||
|
help: 控制正文容器内边距, 例如 2rem / 24px / calc(var(--size-theme-font) * 2)
|
||||||
|
- $formkit: text
|
||||||
|
label: 正文媒体最大宽度
|
||||||
|
name: media_max_width
|
||||||
|
value:
|
||||||
|
placeholder: "60%"
|
||||||
|
help: 控制文章内容中图片 / 视频 / figure 的最大宽度
|
||||||
|
- group: color_scheme
|
||||||
|
label: 配色
|
||||||
|
formSchema:
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
name: default_scheme_mode
|
name: default_scheme_mode
|
||||||
label: 默认配色方案
|
label: 默认模式
|
||||||
value: "light"
|
value: "light"
|
||||||
help: 控制访客首次访问时使用的配色模式
|
help: 控制访客首次访问时使用的外观模式
|
||||||
options:
|
options:
|
||||||
- label: "浅色"
|
- label: "浅色"
|
||||||
value: "light"
|
value: "light"
|
||||||
@@ -214,7 +294,7 @@ spec:
|
|||||||
- $formkit: select
|
- $formkit: select
|
||||||
name: light_color_scheme
|
name: light_color_scheme
|
||||||
id: light_color_scheme
|
id: light_color_scheme
|
||||||
label: 浅色配色方案
|
label: 浅色方案
|
||||||
value: "day"
|
value: "day"
|
||||||
help: 控制浅色模式使用的配色方案
|
help: 控制浅色模式使用的配色方案
|
||||||
options:
|
options:
|
||||||
@@ -247,13 +327,14 @@ spec:
|
|||||||
- $formkit: text
|
- $formkit: text
|
||||||
name: custom_light_scheme
|
name: custom_light_scheme
|
||||||
if: "$get(light_color_scheme).value === 'custom'"
|
if: "$get(light_color_scheme).value === 'custom'"
|
||||||
|
key: custom-light-scheme
|
||||||
label: 自定义浅色配色
|
label: 自定义浅色配色
|
||||||
help: 填写下方自定义配色的 ID
|
help: 填写下方自定义配色的 ID
|
||||||
validation: "required:trim|length:1,32|matches:/^[a-z0-9][a-z0-9_-]*$/"
|
validation: "required:trim|length:1,32|matches:/^[a-z0-9][a-z0-9_-]*$/"
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
name: dark_color_scheme
|
name: dark_color_scheme
|
||||||
id: dark_color_scheme
|
id: dark_color_scheme
|
||||||
label: 深色配色方案
|
label: 深色方案
|
||||||
value: "night"
|
value: "night"
|
||||||
help: 控制深色模式使用的配色方案
|
help: 控制深色模式使用的配色方案
|
||||||
options:
|
options:
|
||||||
@@ -286,12 +367,13 @@ spec:
|
|||||||
- $formkit: text
|
- $formkit: text
|
||||||
name: custom_dark_scheme
|
name: custom_dark_scheme
|
||||||
if: "$get(dark_color_scheme).value === 'custom'"
|
if: "$get(dark_color_scheme).value === 'custom'"
|
||||||
|
key: custom-dark-scheme
|
||||||
label: 自定义深色配色
|
label: 自定义深色配色
|
||||||
help: 填写下方自定义配色的 ID
|
help: 填写下方自定义配色的 ID
|
||||||
validation: "required:trim|length:1,32|matches:/^[a-z0-9][a-z0-9_-]*$/"
|
validation: "required:trim|length:1,32|matches:/^[a-z0-9][a-z0-9_-]*$/"
|
||||||
- $formkit: array
|
- $formkit: array
|
||||||
name: custom_color_schemes
|
name: custom_color_schemes
|
||||||
label: 自定义配色
|
label: 自定义方案
|
||||||
value: [ ]
|
value: [ ]
|
||||||
itemLabels:
|
itemLabels:
|
||||||
- type: "text"
|
- type: "text"
|
||||||
@@ -320,66 +402,89 @@ spec:
|
|||||||
help: 开启后可以单独设置辅助文本, 标题, 标签, 导航, 控件, 边框和代码等语义颜色
|
help: 开启后可以单独设置辅助文本, 标题, 标签, 导航, 控件, 边框和代码等语义颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-text-secondary
|
||||||
name: text_secondary
|
name: text_secondary
|
||||||
label: 辅助文本色
|
label: 辅助文本色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-text-muted
|
||||||
name: text_muted
|
name: text_muted
|
||||||
label: 弱化文字颜色
|
label: 弱化文字颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-text-inverse
|
||||||
name: text_inverse
|
name: text_inverse
|
||||||
label: 反色文字颜色
|
label: 反色文字颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-heading
|
||||||
name: heading
|
name: heading
|
||||||
label: 标题颜色
|
label: 标题颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-label
|
||||||
name: label
|
name: label
|
||||||
label: 标签颜色
|
label: 标签颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-link
|
||||||
name: link
|
name: link
|
||||||
label: 链接颜色
|
label: 链接颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-navigation
|
||||||
name: navigation
|
name: navigation
|
||||||
label: 导航颜色
|
label: 导航颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-control
|
||||||
name: control
|
name: control
|
||||||
label: 控件颜色
|
label: 控件颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-border
|
||||||
name: border
|
name: border
|
||||||
label: 默认边框颜色
|
label: 默认边框颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-border-accent
|
||||||
name: border_accent
|
name: border_accent
|
||||||
label: 交互边框颜色
|
label: 交互边框颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-border-emphasis
|
||||||
name: border_emphasis
|
name: border_emphasis
|
||||||
label: 强调边框颜色
|
label: 强调边框颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-selection
|
||||||
name: selection
|
name: selection
|
||||||
label: 选中文本背景色
|
label: 选中文本背景色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-caret
|
||||||
name: caret
|
name: caret
|
||||||
label: 动态光标颜色
|
label: 动态光标颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-code-text
|
||||||
name: code_text
|
name: code_text
|
||||||
label: 代码文字颜色
|
label: 代码文字颜色
|
||||||
- $formkit: color
|
- $formkit: color
|
||||||
if: "$value.advanced === true"
|
if: "$value.advanced === true"
|
||||||
|
key: scheme-code-background
|
||||||
name: code_background
|
name: code_background
|
||||||
label: 代码背景颜色
|
label: 代码背景颜色
|
||||||
|
- group: global_style
|
||||||
|
label: 全局样式
|
||||||
|
formSchema:
|
||||||
|
- $formkit: checkbox
|
||||||
|
name: pixel_style
|
||||||
|
label: 默认像素化风格
|
||||||
|
value: false
|
||||||
|
help: 开启后将默认使用像素风格字体及图标
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
label: 无序列表样式
|
label: 无序列表标记
|
||||||
name: list_style
|
name: list_style
|
||||||
value: ""
|
value: ""
|
||||||
placeholder: "disc"
|
placeholder: "disc"
|
||||||
@@ -402,6 +507,12 @@ spec:
|
|||||||
value: "double"
|
value: "double"
|
||||||
- label: "none"
|
- label: "none"
|
||||||
value: "none"
|
value: "none"
|
||||||
|
- $formkit: text
|
||||||
|
label: 边线宽度
|
||||||
|
name: border_width
|
||||||
|
value:
|
||||||
|
placeholder: "calc(var(--size-theme-font) * 0.125)"
|
||||||
|
help: 控制主题通用边线宽度
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
label: 表格边线样式
|
label: 表格边线样式
|
||||||
name: table_border_style
|
name: table_border_style
|
||||||
@@ -420,6 +531,12 @@ spec:
|
|||||||
value: "double"
|
value: "double"
|
||||||
- label: "none"
|
- label: "none"
|
||||||
value: "none"
|
value: "none"
|
||||||
|
- $formkit: text
|
||||||
|
label: 表格边线宽度
|
||||||
|
name: table_border_width
|
||||||
|
value:
|
||||||
|
placeholder: "calc(var(--size-theme-font) * 0.0625)"
|
||||||
|
help: 控制表格边线宽度
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
label: 标题分隔线样式
|
label: 标题分隔线样式
|
||||||
name: title_divider_style
|
name: title_divider_style
|
||||||
@@ -438,90 +555,59 @@ spec:
|
|||||||
value: "double"
|
value: "double"
|
||||||
- label: "none"
|
- label: "none"
|
||||||
value: "none"
|
value: "none"
|
||||||
- $formkit: select
|
|
||||||
name: time_style
|
|
||||||
id: time_style
|
|
||||||
label: 时间格式
|
|
||||||
value: "yyyy-MM-dd"
|
|
||||||
help: 控制文章发布时间的显示格式
|
|
||||||
options:
|
|
||||||
- label: "yyyy-MM-ddTHH:mm:ssXXX"
|
|
||||||
value: "yyyy-MM-dd''T''HH:mm:ssXXX"
|
|
||||||
- label: "yyyy-MM-dd HH:mm:ss"
|
|
||||||
value: "yyyy-MM-dd'' ''HH:mm:ss"
|
|
||||||
- label: "yyyy-MM-dd"
|
|
||||||
value: "yyyy-MM-dd"
|
|
||||||
- label: "custom"
|
|
||||||
value: "custom"
|
|
||||||
- $formkit: text
|
- $formkit: text
|
||||||
if: "$get(time_style).value === 'custom'"
|
label: 元信息分隔符
|
||||||
name: custom_time_style
|
|
||||||
label: 自定义时间格式
|
|
||||||
placeholder: "yyyy-MM-dd"
|
|
||||||
validation: "required"
|
|
||||||
- $formkit: number
|
|
||||||
name: prefer_ttl
|
|
||||||
label: 访客偏好有效期 (小时)
|
|
||||||
value: 24
|
|
||||||
min: 0
|
|
||||||
validation: "number|min:0"
|
|
||||||
help: 访客手动选择的模式, 配色和像素风格过期后会在下次访问时恢复默认值, 设为 0 表示永久保存
|
|
||||||
- $formkit: text
|
|
||||||
label: 正文区域最大宽度
|
|
||||||
name: max_width
|
|
||||||
value:
|
|
||||||
help: 控制正文区域最大宽度, 例如 960px / 80vw
|
|
||||||
- $formkit: text
|
|
||||||
label: 正文区域内边距
|
|
||||||
name: content_padding
|
|
||||||
value:
|
|
||||||
placeholder: "calc(var(--size-theme-font) * 2.5)"
|
|
||||||
help: 控制正文容器内边距, 例如 2rem / 24px / calc(var(--size-theme-font) * 2)
|
|
||||||
- $formkit: text
|
|
||||||
label: 正文媒体最大宽度
|
|
||||||
name: media_max_width
|
|
||||||
value:
|
|
||||||
placeholder: "60%"
|
|
||||||
help: 控制文章内容中图片 / 视频 / figure 的最大宽度
|
|
||||||
- $formkit: text
|
|
||||||
label: 基础字体大小
|
|
||||||
name: font_size
|
|
||||||
value:
|
|
||||||
placeholder: "1rem"
|
|
||||||
help: 控制全站基础字体大小, 例如 16px / 1rem / 18px
|
|
||||||
- $formkit: text
|
|
||||||
label: 基础行高
|
|
||||||
name: line_height
|
|
||||||
value:
|
|
||||||
placeholder: "calc(var(--size-theme-font) * 1.8)"
|
|
||||||
help: 控制全站基础行高, 例如 1.8 / 28px / calc(var(--size-theme-font) * 1.8)
|
|
||||||
- $formkit: text
|
|
||||||
label: 文章段落间距
|
|
||||||
name: post_paragraph_spacing
|
|
||||||
value:
|
|
||||||
placeholder: "calc(var(--size-theme-font) * 1.5625)"
|
|
||||||
help: 控制文章正文段落的上下间距, 例如 1.5rem / 24px / calc(var(--size-theme-font) * 1.5)
|
|
||||||
- $formkit: text
|
|
||||||
label: 文章元信息分隔符
|
|
||||||
name: post_meta_divider
|
name: post_meta_divider
|
||||||
value:
|
value:
|
||||||
placeholder: "::"
|
placeholder: "::"
|
||||||
help: "控制文章元信息之间的分隔符, 例如 ::, |, ·"
|
help: "控制文章元信息之间的分隔符, 例如 ::, |, ·"
|
||||||
- $formkit: text
|
- group: sns
|
||||||
label: 边线宽度
|
label: 社交资料
|
||||||
name: border_width
|
formSchema:
|
||||||
value:
|
- $formkit: checkbox
|
||||||
placeholder: "calc(var(--size-theme-font) * 0.125)"
|
name: rss
|
||||||
help: 控制主题通用边线宽度
|
label: RSS
|
||||||
- $formkit: text
|
value: false
|
||||||
label: 表格边线宽度
|
- $formkit: array
|
||||||
name: table_border_width
|
name: social_media
|
||||||
value:
|
label: 社交媒体
|
||||||
placeholder: "calc(var(--size-theme-font) * 0.0625)"
|
value: [ ]
|
||||||
help: 控制表格边线宽度
|
itemLabels:
|
||||||
|
- type: "iconify"
|
||||||
|
label: "$value.iconify"
|
||||||
|
- type: "text"
|
||||||
|
label: "$value.name"
|
||||||
|
- type: "text"
|
||||||
|
label: "$value.url"
|
||||||
|
children:
|
||||||
|
- $formkit: iconify
|
||||||
|
name: iconify
|
||||||
|
label: 图标
|
||||||
|
format: svg
|
||||||
|
validation: "required"
|
||||||
|
- $formkit: iconify
|
||||||
|
name: pixel_iconify
|
||||||
|
label: 像素风格图标
|
||||||
|
format: svg
|
||||||
|
help: "留空时使用普通图标"
|
||||||
|
- $formkit: text
|
||||||
|
name: name
|
||||||
|
label: 名称
|
||||||
|
- $formkit: text
|
||||||
|
name: url
|
||||||
|
label: 链接
|
||||||
|
validation:
|
||||||
|
- - required
|
||||||
|
- - matches
|
||||||
|
- "/^https?:\\/\\/\\S+$/"
|
||||||
|
- "/^mailto:\\S+$/"
|
||||||
|
- "/^tel:\\+?[0-9(). -]+$/"
|
||||||
|
- group: advanced
|
||||||
|
label: 高级设置
|
||||||
|
formSchema:
|
||||||
- $formkit: code
|
- $formkit: code
|
||||||
name: custom
|
name: custom
|
||||||
label: 自定义样式
|
label: 自定义 CSS
|
||||||
language: css
|
language: css
|
||||||
height: 150px
|
height: 150px
|
||||||
value: ""
|
value: ""
|
||||||
@@ -552,6 +638,7 @@ spec:
|
|||||||
value: true
|
value: true
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
if: "$get(show_pin).value === true"
|
if: "$get(show_pin).value === true"
|
||||||
|
key: pin-position
|
||||||
name: pin_pos
|
name: pin_pos
|
||||||
label: pin 图标显示位置
|
label: pin 图标显示位置
|
||||||
options:
|
options:
|
||||||
@@ -573,6 +660,7 @@ spec:
|
|||||||
value: true
|
value: true
|
||||||
- $formkit: select
|
- $formkit: select
|
||||||
if: "$get(show_toc).value === true"
|
if: "$get(show_toc).value === true"
|
||||||
|
key: toc-default-open
|
||||||
name: toc_default_open
|
name: toc_default_open
|
||||||
label: 文章目录默认状态
|
label: 文章目录默认状态
|
||||||
value: "auto"
|
value: "auto"
|
||||||
@@ -639,47 +727,6 @@ spec:
|
|||||||
name: title
|
name: title
|
||||||
label: 标题
|
label: 标题
|
||||||
value:
|
value:
|
||||||
- group: sns
|
|
||||||
label: 社交资料
|
|
||||||
formSchema:
|
|
||||||
- $formkit: checkbox
|
|
||||||
name: rss
|
|
||||||
label: RSS
|
|
||||||
value: false
|
|
||||||
- $formkit: array
|
|
||||||
name: social_media
|
|
||||||
label: 社交媒体
|
|
||||||
value: [ ]
|
|
||||||
itemLabels:
|
|
||||||
- type: "iconify"
|
|
||||||
label: "$value.iconify"
|
|
||||||
- type: "text"
|
|
||||||
label: "$value.name"
|
|
||||||
- type: "text"
|
|
||||||
label: "$value.url"
|
|
||||||
children:
|
|
||||||
- $formkit: iconify
|
|
||||||
name: iconify
|
|
||||||
label: 图标
|
|
||||||
format: svg
|
|
||||||
validation: "required"
|
|
||||||
- $formkit: iconify
|
|
||||||
name: pixel_iconify
|
|
||||||
label: 像素风格图标
|
|
||||||
format: svg
|
|
||||||
help: "留空时使用普通图标"
|
|
||||||
- $formkit: text
|
|
||||||
name: name
|
|
||||||
label: 名称
|
|
||||||
- $formkit: text
|
|
||||||
name: url
|
|
||||||
label: 链接
|
|
||||||
validation:
|
|
||||||
- - required
|
|
||||||
- - matches
|
|
||||||
- "/^https?:\\/\\/\\S+$/"
|
|
||||||
- "/^mailto:\\S+$/"
|
|
||||||
- "/^tel:\\+?[0-9(). -]+$/"
|
|
||||||
- group: icp
|
- group: icp
|
||||||
label: 备案
|
label: 备案
|
||||||
formSchema:
|
formSchema:
|
||||||
|
|||||||
@@ -28,8 +28,8 @@
|
|||||||
<li class="post-list" th:each="post : ${month.posts}">
|
<li class="post-list" th:each="post : ${month.posts}">
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<time class="post-time"
|
<time class="post-time"
|
||||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.style.time_style == 'custom' ?
|
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.general.time_style == 'custom' ?
|
||||||
theme.config.style.custom_time_style : theme.config.style.time_style}__')}">
|
theme.config.general.custom_time_style : theme.config.general.time_style}__')}">
|
||||||
Publish
|
Publish
|
||||||
Time
|
Time
|
||||||
</time>
|
</time>
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<time class="post-date"
|
<time class="post-date"
|
||||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.style.time_style == 'custom' ?
|
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.general.time_style == 'custom' ?
|
||||||
theme.config.style.custom_time_style : theme.config.style.time_style}__')}">Publish Time</time>
|
theme.config.general.custom_time_style : theme.config.general.time_style}__')}">Publish Time</time>
|
||||||
<span class="post-author"
|
<span class="post-author"
|
||||||
th:with="contributor = ${post.contributors[0]}"
|
th:with="contributor = ${post.contributors[0]}"
|
||||||
th:text="${contributor.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.index_page.show_tags})}"/>
|
th:text="${contributor.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.index_page.show_tags})}"/>
|
||||||
|
|||||||
+38
-38
@@ -10,79 +10,79 @@
|
|||||||
<th:block th:replace="~{modules/theme-preferences :: theme-preferences}"/>
|
<th:block th:replace="~{modules/theme-preferences :: theme-preferences}"/>
|
||||||
<link data-no-pjax rel="stylesheet" th:href="@{/assets/dist/main.css?v={version}(version=${theme.spec.version})}"/>
|
<link data-no-pjax rel="stylesheet" th:href="@{/assets/dist/main.css?v={version}(version=${theme.spec.version})}"/>
|
||||||
<script data-no-pjax type="module" th:src="@{/assets/dist/main.js?v={version}(version=${theme.spec.version})}"></script>
|
<script data-no-pjax type="module" th:src="@{/assets/dist/main.js?v={version}(version=${theme.spec.version})}"></script>
|
||||||
<script data-no-pjax type="module" th:if="${theme.config.basic.pjax_enable}"
|
<script data-no-pjax type="module" th:if="${theme.config.general.pjax_enable}"
|
||||||
th:src="@{/assets/dist/libs/pjax.js?v={version}(version=${theme.spec.version})}"></script>
|
th:src="@{/assets/dist/libs/pjax.js?v={version}(version=${theme.spec.version})}"></script>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.media_max_width)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.layout.media_max_width)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--width-theme-media-max: [(${theme.config.style.media_max_width})];
|
--width-theme-media-max: [(${theme.config.layout.media_max_width})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.font_size)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.typography.font_size)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--size-theme-font: [(${theme.config.style.font_size})];
|
--size-theme-font: [(${theme.config.typography.font_size})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.line_height)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.typography.line_height)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--height-theme-line: [(${theme.config.style.line_height})];
|
--height-theme-line: [(${theme.config.typography.line_height})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.post_paragraph_spacing)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.typography.post_paragraph_spacing)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--spacing-theme-post-paragraph: [(${theme.config.style.post_paragraph_spacing})];
|
--spacing-theme-post-paragraph: [(${theme.config.typography.post_paragraph_spacing})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.post_meta_divider)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.post_meta_divider)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--content-theme-post-meta-divider: "[(${theme.config.style.post_meta_divider})]";
|
--content-theme-post-meta-divider: "[(${theme.config.global_style.post_meta_divider})]";
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.content_padding)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.layout.content_padding)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--spacing-theme-container-padding: [(${theme.config.style.content_padding})];
|
--spacing-theme-container-padding: [(${theme.config.layout.content_padding})];
|
||||||
--spacing-theme-container-padding-mobile: [(${theme.config.style.content_padding})];
|
--spacing-theme-container-padding-mobile: [(${theme.config.layout.content_padding})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.list_style)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.list_style)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--list-theme-style: [(${theme.config.style.list_style})];
|
--list-theme-style: [(${theme.config.global_style.list_style})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.border_width)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.border_width)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--width-theme-border: [(${theme.config.style.border_width})];
|
--width-theme-border: [(${theme.config.global_style.border_width})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.border_style)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.border_style)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--style-theme-border: [(${theme.config.style.border_style})];
|
--style-theme-border: [(${theme.config.global_style.border_style})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.table_border_width)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.table_border_width)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--width-theme-table-border: [(${theme.config.style.table_border_width})];
|
--width-theme-table-border: [(${theme.config.global_style.table_border_width})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.table_border_style)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.table_border_style)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--style-theme-table-border: [(${theme.config.style.table_border_style})];
|
--style-theme-table-border: [(${theme.config.global_style.table_border_style})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.title_divider_style)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.global_style.title_divider_style)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--style-theme-title-divider: [(${theme.config.style.title_divider_style})];
|
--style-theme-title-divider: [(${theme.config.global_style.title_divider_style})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.style.default_font)}" th:inline="css">
|
<style data-no-pjax th:if="${not #strings.isEmpty(theme.config.typography.default_font)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--family-theme-font: [(${theme.config.style.default_font})];
|
--family-theme-font: [(${theme.config.typography.default_font})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script data-no-pjax>
|
<script data-no-pjax>
|
||||||
window.TerminalTheme?.applyCustomCss?.();
|
window.TerminalTheme?.applyCustomCss?.();
|
||||||
</script>
|
</script>
|
||||||
<style th:inline="css">
|
<style th:inline="css">
|
||||||
[# th:each="scheme : ${theme.config.style.custom_color_schemes}"]
|
[# th:each="scheme : ${theme.config.color_scheme.custom_color_schemes}"]
|
||||||
html[data-theme-color-scheme="[(${scheme.id})]"] {
|
html[data-theme-color-scheme="[(${scheme.id})]"] {
|
||||||
--color-theme-background: [(${scheme.background})];
|
--color-theme-background: [(${scheme.background})];
|
||||||
--color-theme-text: [(${#strings.isEmpty(scheme.text) ? scheme.foreground : scheme.text})];
|
--color-theme-text: [(${#strings.isEmpty(scheme.text) ? scheme.foreground : scheme.text})];
|
||||||
@@ -151,12 +151,12 @@
|
|||||||
[/]
|
[/]
|
||||||
</style>
|
</style>
|
||||||
<th:block
|
<th:block
|
||||||
th:if="${theme.config?.style?.custom_font_enable
|
th:if="${theme.config?.typography?.custom_font_enable
|
||||||
and theme.config?.style?.custom_fonts != null
|
and theme.config?.typography?.custom_fonts != null
|
||||||
and not #lists.isEmpty(theme.config.style.custom_fonts)}">
|
and not #lists.isEmpty(theme.config.typography.custom_fonts)}">
|
||||||
|
|
||||||
<!-- Preload primary font -->
|
<!-- Preload primary font -->
|
||||||
<th:block th:with="font=${theme.config.style.custom_fonts[0]}">
|
<th:block th:with="font=${theme.config.typography.custom_fonts[0]}">
|
||||||
<link th:href="${font.file}"
|
<link th:href="${font.file}"
|
||||||
as="font"
|
as="font"
|
||||||
th:type="${font.format == 'woff2' ? 'font/woff2' :
|
th:type="${font.format == 'woff2' ? 'font/woff2' :
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
|
|
||||||
<!--/*/
|
<!--/*/
|
||||||
<style th:inline="css">
|
<style th:inline="css">
|
||||||
[# th:each="font : ${theme.config.style.custom_fonts}"]
|
[# th:each="font : ${theme.config.typography.custom_fonts}"]
|
||||||
@font-face {
|
@font-face {
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
font-family: "[(${font.family_name})]";
|
font-family: "[(${font.family_name})]";
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
|
|
||||||
:root {
|
:root {
|
||||||
--family-theme-font:
|
--family-theme-font:
|
||||||
[# th:each="font, stat : ${theme.config.style.custom_fonts}"]
|
[# th:each="font, stat : ${theme.config.typography.custom_fonts}"]
|
||||||
"[(${font.family_name})]"[# th:if="${!stat.last}"],[/]
|
"[(${font.family_name})]"[# th:if="${!stat.last}"],[/]
|
||||||
[/];
|
[/];
|
||||||
}
|
}
|
||||||
@@ -218,11 +218,11 @@
|
|||||||
</th:block>
|
</th:block>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body th:attr="data-layout-mode=${theme.config.style.fullscreen_layout ? 'fullscreen' : 'normal'},
|
<body th:attr="data-layout-mode=${theme.config.layout.fullscreen_layout ? 'fullscreen' : 'normal'},
|
||||||
data-table-full-width=${theme.config.style.table_full_width ? 'true' : 'false'}">
|
data-table-full-width=${theme.config.layout.table_full_width ? 'true' : 'false'}">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div class="container"
|
<div class="container"
|
||||||
th:attr="style=${theme.config.style.fullscreen_layout or #strings.isEmpty(theme.config.style.max_width) ? null : 'max-width:' + theme.config.style.max_width}">
|
th:attr="style=${theme.config.layout.fullscreen_layout or #strings.isEmpty(theme.config.layout.max_width) ? null : 'max-width:' + theme.config.layout.max_width}">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<th:block th:replace="~{modules/header :: header}"/>
|
<th:block th:replace="~{modules/header :: header}"/>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="header-logo">
|
<div class="header-logo">
|
||||||
<a data-pjax th:href="@{/}">
|
<a data-pjax th:href="@{/}">
|
||||||
<div class="logo"
|
<div class="logo"
|
||||||
th:text="${#strings.isEmpty(theme.config.basic.logo) ? site.title : theme.config.basic.logo}">
|
th:text="${#strings.isEmpty(theme.config.header.logo) ? site.title : theme.config.header.logo}">
|
||||||
Blog Title
|
Blog Title
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
th:attr="aria-label=#{header.search.open}"
|
th:attr="aria-label=#{header.search.open}"
|
||||||
type="button"
|
type="button"
|
||||||
data-header-action="open-search"
|
data-header-action="open-search"
|
||||||
th:if="${theme.config.style.search_button_enable != false and pluginFinder.available('PluginSearchWidget')}">
|
th:if="${theme.config.header.search_button_enable != false and pluginFinder.available('PluginSearchWidget')}">
|
||||||
<svg class="icon-regular button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
<svg class="icon-regular button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
<path
|
<path
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<div
|
<div
|
||||||
id="color-scheme-picker"
|
id="color-scheme-picker"
|
||||||
class="color-scheme-picker"
|
class="color-scheme-picker"
|
||||||
th:if="${theme.config.style.color_scheme_switcher_enable != false}">
|
th:if="${theme.config.header.color_scheme_switcher_enable != false}">
|
||||||
<button
|
<button
|
||||||
id="color-scheme-trigger"
|
id="color-scheme-trigger"
|
||||||
class="color-scheme-trigger"
|
class="color-scheme-trigger"
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
<button
|
<button
|
||||||
id="appearance-toggle"
|
id="appearance-toggle"
|
||||||
th:attr="aria-label=#{header.appearance.current}"
|
th:attr="aria-label=#{header.appearance.current}"
|
||||||
th:if="${theme.config.style.appearance_switcher_enable != false}"
|
th:if="${theme.config.header.appearance_switcher_enable != false}"
|
||||||
type="button">
|
type="button">
|
||||||
<svg class="appearance-icon icon-regular button-icon" data-appearance-mode="light" aria-hidden="true"
|
<svg class="appearance-icon icon-regular button-icon" data-appearance-mode="light" aria-hidden="true"
|
||||||
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
<button
|
<button
|
||||||
id="pixel-toggle"
|
id="pixel-toggle"
|
||||||
th:attr="aria-label=#{header.pixel_style.toggle}"
|
th:attr="aria-label=#{header.pixel_style.toggle}"
|
||||||
th:if="${theme.config.style.pixel_style_switcher_enable != false}"
|
th:if="${theme.config.header.pixel_style_switcher_enable != false}"
|
||||||
type="button">
|
type="button">
|
||||||
<svg class="icon-pixel button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
<svg class="icon-pixel button-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
<path fill="currentColor"
|
<path fill="currentColor"
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<th:block th:fragment="theme-preferences">
|
<th:block th:fragment="theme-preferences">
|
||||||
<script data-no-pjax th:inline="javascript">
|
<script data-no-pjax th:inline="javascript">
|
||||||
window.TerminalThemeConfig = {
|
window.TerminalThemeConfig = {
|
||||||
darkTheme: /*[[${theme.config.style.dark_color_scheme}]]*/ "dark",
|
darkTheme: /*[[${theme.config.color_scheme.dark_color_scheme}]]*/ "dark",
|
||||||
lightTheme: /*[[${theme.config.style.light_color_scheme}]]*/ "light",
|
lightTheme: /*[[${theme.config.color_scheme.light_color_scheme}]]*/ "light",
|
||||||
customDarkTheme: /*[[${theme.config.style.custom_dark_scheme}]]*/ "",
|
customDarkTheme: /*[[${theme.config.color_scheme.custom_dark_scheme}]]*/ "",
|
||||||
customLightTheme: /*[[${theme.config.style.custom_light_scheme}]]*/ "",
|
customLightTheme: /*[[${theme.config.color_scheme.custom_light_scheme}]]*/ "",
|
||||||
defaultMode: /*[[${theme.config.style.default_scheme_mode}]]*/ "system",
|
defaultMode: /*[[${theme.config.color_scheme.default_scheme_mode}]]*/ "system",
|
||||||
preferTTL: /*[[${theme.config.style.prefer_ttl ?: 24}]]*/ 24,
|
preferTTL: /*[[${theme.config.general.prefer_ttl ?: 24}]]*/ 24,
|
||||||
pixelStyle: /*[[${theme.config.style.pixel_style}]]*/ false,
|
pixelStyle: /*[[${theme.config.global_style.pixel_style}]]*/ false,
|
||||||
pixelCssHref: /*[[@{/assets/dist/pixel.css?v={version}(version=${theme.spec.version})}]]*/ "",
|
pixelCssHref: /*[[@{/assets/dist/pixel.css?v={version}(version=${theme.spec.version})}]]*/ "",
|
||||||
customCss: /*[[${theme.config.style.custom}]]*/ "",
|
customCss: /*[[${theme.config.advanced.custom}]]*/ "",
|
||||||
messages: {
|
messages: {
|
||||||
currentColorScheme: /*[[#{header.color_scheme.current}]]*/ "Current color scheme",
|
currentColorScheme: /*[[#{header.color_scheme.current}]]*/ "Current color scheme",
|
||||||
currentAppearance: /*[[#{header.appearance.current}]]*/ "Current appearance",
|
currentAppearance: /*[[#{header.appearance.current}]]*/ "Current appearance",
|
||||||
|
|||||||
+3
-3
@@ -12,8 +12,8 @@
|
|||||||
<h1 class="post-title" th:text="${post.spec.title}">Post Title</h1>
|
<h1 class="post-title" th:text="${post.spec.title}">Post Title</h1>
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<time class="post-time"
|
<time class="post-time"
|
||||||
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.style.time_style == 'custom' ?
|
th:text="${#dates.format(post.spec.publishTime, '__${theme.config.general.time_style == 'custom' ?
|
||||||
theme.config.style.custom_time_style : theme.config.style.time_style}__')}">Publish Time
|
theme.config.general.custom_time_style : theme.config.general.time_style}__')}">Publish Time
|
||||||
</time>
|
</time>
|
||||||
<span class="post-author" th:text="${post.owner.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.post_page.show_tags})}"/>
|
<span class="post-author" th:text="${post.owner.displayName}">Author</span><th:block th:replace="~{modules/tag-list(post = ${post}, show = ${theme.config.post_page.show_tags})}"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</article>
|
</article>
|
||||||
<nav id="toc" th:if="${theme.config.post_page.show_toc}" class="toc"
|
<nav id="toc" th:if="${theme.config.post_page.show_toc}" class="toc"
|
||||||
th:with="tocDefaultOpen=${theme.config.post_page.toc_default_open ?: 'auto'}"
|
th:with="tocDefaultOpen=${theme.config.post_page.toc_default_open ?: 'auto'}"
|
||||||
th:attr="data-default-open=${tocDefaultOpen == 'open' ? 'true' : (tocDefaultOpen == 'closed' ? 'false' : (theme.config.style.fullscreen_layout ? 'false' : 'true'))}">
|
th:attr="data-default-open=${tocDefaultOpen == 'open' ? 'true' : (tocDefaultOpen == 'closed' ? 'false' : (theme.config.layout.fullscreen_layout ? 'false' : 'true'))}">
|
||||||
<button id="toc-toggle" class="toc-toggle" th:attr="aria-label=#{toc.hide}"></button>
|
<button id="toc-toggle" class="toc-toggle" th:attr="aria-label=#{toc.hide}"></button>
|
||||||
<div id="toc-content" class="toc-content"></div>
|
<div id="toc-content" class="toc-content"></div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user