feat: add font size setting
This commit is contained in:
@@ -58,6 +58,13 @@ spec:
|
||||
placeholder: "60%"
|
||||
help: 控制文章内容中图片、视频、figure 的最大宽度, 留空使用主题默认值
|
||||
|
||||
- $formkit: text
|
||||
label: 基础字体大小
|
||||
name: font_size
|
||||
value:
|
||||
placeholder: "1rem"
|
||||
help: 控制全站基础字体大小, 例如 16px、1rem、18px, 留空使用主题默认值
|
||||
|
||||
- $formkit: checkbox
|
||||
label: 使用系统字体
|
||||
name: system_font_enable
|
||||
|
||||
@@ -142,6 +142,11 @@
|
||||
--width-theme-media-max: [(${theme.config.style.media_max_width})];
|
||||
}
|
||||
</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>
|
||||
window.TerminalTheme?.applyCustomCss?.();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user