feat: add font size setting

This commit is contained in:
Erzbir
2026-06-15 22:23:34 +08:00
parent cf1c3ec085
commit 99a04beb11
2 changed files with 12 additions and 0 deletions
+7
View File
@@ -58,6 +58,13 @@ spec:
placeholder: "60%" placeholder: "60%"
help: 控制文章内容中图片、视频、figure 的最大宽度, 留空使用主题默认值 help: 控制文章内容中图片、视频、figure 的最大宽度, 留空使用主题默认值
- $formkit: text
label: 基础字体大小
name: font_size
value:
placeholder: "1rem"
help: 控制全站基础字体大小, 例如 16px、1rem、18px, 留空使用主题默认值
- $formkit: checkbox - $formkit: checkbox
label: 使用系统字体 label: 使用系统字体
name: system_font_enable name: system_font_enable
+5
View File
@@ -142,6 +142,11 @@
--width-theme-media-max: [(${theme.config.style.media_max_width})]; --width-theme-media-max: [(${theme.config.style.media_max_width})];
} }
</style> </style>
<style no-pjax th:if="${not #strings.isEmpty(theme.config.style.font_size)}" th:inline="css">
:root {
--size-theme-font: [(${theme.config.style.font_size})];
}
</style>
<script no-pjax> <script no-pjax>
window.TerminalTheme?.applyCustomCss?.(); window.TerminalTheme?.applyCustomCss?.();
</script> </script>