feat: add line height setting
This commit is contained in:
@@ -162,6 +162,20 @@ spec:
|
|||||||
placeholder: "1rem"
|
placeholder: "1rem"
|
||||||
help: 控制全站基础字体大小, 例如 16px / 1rem / 18px, 留空使用主题默认值
|
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: checkbox
|
- $formkit: checkbox
|
||||||
label: 使用系统字体
|
label: 使用系统字体
|
||||||
name: system_font_enable
|
name: system_font_enable
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
--list-theme-marker: "►";
|
--list-theme-marker: "►";
|
||||||
--size-theme-font: 1rem;
|
--size-theme-font: 1rem;
|
||||||
--height-theme-line: calc(var(--size-theme-font) * 1.8);
|
--height-theme-line: calc(var(--size-theme-font) * 1.8);
|
||||||
|
--spacing-theme-post-paragraph: calc(var(--size-theme-font) * 1.5625);
|
||||||
--radius-theme-border: 0;
|
--radius-theme-border: 0;
|
||||||
--family-theme-font: 'JetBrains Mono';
|
--family-theme-font: 'JetBrains Mono';
|
||||||
--family-theme-fallback-font: -apple-system, BlinkMacSystemFont, 'segoe ui', Roboto, Oxygen,
|
--family-theme-fallback-font: -apple-system, BlinkMacSystemFont, 'segoe ui', Roboto, Oxygen,
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
--style-theme-border: solid;
|
--style-theme-border: solid;
|
||||||
--style-theme-table-border: dashed;
|
--style-theme-table-border: dashed;
|
||||||
--style-theme-title-divider: dashed;
|
--style-theme-title-divider: dashed;
|
||||||
|
--weight-theme-inline-code: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@@ -386,19 +388,21 @@ li::marker {
|
|||||||
|
|
||||||
code {
|
code {
|
||||||
color: var(--color-theme-code-text);
|
color: var(--color-theme-code-text);
|
||||||
|
background: var(--color-theme-code-background);
|
||||||
|
font-weight: var(--weight-theme-inline-code);
|
||||||
}
|
}
|
||||||
|
|
||||||
code,
|
code,
|
||||||
kbd {
|
kbd {
|
||||||
font-family: inherit !important;
|
font-family: inherit !important;
|
||||||
font-feature-settings: normal;
|
font-feature-settings: normal;
|
||||||
background: var(--color-theme-surface-hover);
|
|
||||||
padding: calc(var(--size-theme-font) * 0.0625) calc(var(--size-theme-font) * 0.375);
|
padding: calc(var(--size-theme-font) * 0.0625) calc(var(--size-theme-font) * 0.375);
|
||||||
margin: 0 calc(var(--size-theme-font) * 0.125);
|
margin: 0 calc(var(--size-theme-font) * 0.125);
|
||||||
font-size: calc(var(--size-theme-font) * 0.95);
|
font-size: calc(var(--size-theme-font) * 0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
kbd {
|
kbd {
|
||||||
|
background: var(--color-theme-surface-hover);
|
||||||
border-top: calc(var(--width-theme-border) / 2) solid var(--color-theme-accent-subtle);
|
border-top: calc(var(--width-theme-border) / 2) solid var(--color-theme-accent-subtle);
|
||||||
border-left: calc(var(--width-theme-border) / 2) solid var(--color-theme-accent);
|
border-left: calc(var(--width-theme-border) / 2) solid var(--color-theme-accent);
|
||||||
border-right: calc(var(--width-theme-border) / 2) solid var(--color-theme-accent);
|
border-right: calc(var(--width-theme-border) / 2) solid var(--color-theme-accent);
|
||||||
@@ -431,6 +435,7 @@ pre {
|
|||||||
|
|
||||||
pre code {
|
pre code {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
|
font-weight: inherit;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
@@ -534,7 +539,7 @@ blockquote.twitter-tweet {
|
|||||||
|
|
||||||
blockquote.twitter-tweet a {
|
blockquote.twitter-tweet a {
|
||||||
color: var(--color-theme-accent);
|
color: var(--color-theme-accent);
|
||||||
text-decoration: underline;
|
text-decoration: var(--text-decoration-theme-post-link);
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote.twitter-tweet::before {
|
blockquote.twitter-tweet::before {
|
||||||
|
|||||||
@@ -132,6 +132,10 @@
|
|||||||
text-decoration: var(--text-decoration-theme-post-link);
|
text-decoration: var(--text-decoration-theme-post-link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-body p {
|
||||||
|
margin-block: var(--spacing-theme-post-paragraph);
|
||||||
|
}
|
||||||
|
|
||||||
.post-cover {
|
.post-cover {
|
||||||
margin: calc(var(--size-theme-font) * 1.5625) 0;
|
margin: calc(var(--size-theme-font) * 1.5625) 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,16 @@
|
|||||||
--size-theme-font: [(${theme.config.style.font_size})];
|
--size-theme-font: [(${theme.config.style.font_size})];
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style no-pjax th:if="${not #strings.isEmpty(theme.config.style.line_height)}" th:inline="css">
|
||||||
|
:root {
|
||||||
|
--height-theme-line: [(${theme.config.style.line_height})];
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style no-pjax th:if="${not #strings.isEmpty(theme.config.style.post_paragraph_spacing)}" th:inline="css">
|
||||||
|
:root {
|
||||||
|
--spacing-theme-post-paragraph: [(${theme.config.style.post_paragraph_spacing})];
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<style no-pjax th:if="${not #strings.isEmpty(theme.config.style.content_padding)}" th:inline="css">
|
<style no-pjax th:if="${not #strings.isEmpty(theme.config.style.content_padding)}" th:inline="css">
|
||||||
:root {
|
:root {
|
||||||
--spacing-theme-container-padding: [(${theme.config.style.content_padding})];
|
--spacing-theme-container-padding: [(${theme.config.style.content_padding})];
|
||||||
|
|||||||
Reference in New Issue
Block a user