diff --git a/settings.yaml b/settings.yaml
index 3b894a5..9b05460 100644
--- a/settings.yaml
+++ b/settings.yaml
@@ -162,6 +162,20 @@ spec:
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: checkbox
label: 使用系统字体
name: system_font_enable
diff --git a/src/styles/main.scss b/src/styles/main.scss
index b1a94a3..1c92522 100644
--- a/src/styles/main.scss
+++ b/src/styles/main.scss
@@ -6,6 +6,7 @@
--list-theme-marker: "►";
--size-theme-font: 1rem;
--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;
--family-theme-font: 'JetBrains Mono';
--family-theme-fallback-font: -apple-system, BlinkMacSystemFont, 'segoe ui', Roboto, Oxygen,
@@ -21,6 +22,7 @@
--style-theme-border: solid;
--style-theme-table-border: dashed;
--style-theme-title-divider: dashed;
+ --weight-theme-inline-code: inherit;
}
html {
@@ -386,19 +388,21 @@ li::marker {
code {
color: var(--color-theme-code-text);
+ background: var(--color-theme-code-background);
+ font-weight: var(--weight-theme-inline-code);
}
code,
kbd {
font-family: inherit !important;
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);
margin: 0 calc(var(--size-theme-font) * 0.125);
font-size: calc(var(--size-theme-font) * 0.95);
}
kbd {
+ background: var(--color-theme-surface-hover);
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-right: calc(var(--width-theme-border) / 2) solid var(--color-theme-accent);
@@ -431,6 +435,7 @@ pre {
pre code {
background: none !important;
+ font-weight: inherit;
margin: 0;
padding: 0;
border: none;
@@ -534,7 +539,7 @@ blockquote.twitter-tweet {
blockquote.twitter-tweet a {
color: var(--color-theme-accent);
- text-decoration: underline;
+ text-decoration: var(--text-decoration-theme-post-link);
}
blockquote.twitter-tweet::before {
diff --git a/src/styles/post.scss b/src/styles/post.scss
index fe416b5..0e77662 100644
--- a/src/styles/post.scss
+++ b/src/styles/post.scss
@@ -132,6 +132,10 @@
text-decoration: var(--text-decoration-theme-post-link);
}
+.post-body p {
+ margin-block: var(--spacing-theme-post-paragraph);
+}
+
.post-cover {
margin: calc(var(--size-theme-font) * 1.5625) 0;
}
diff --git a/templates/modules/layout.html b/templates/modules/layout.html
index 923f534..67bf17a 100644
--- a/templates/modules/layout.html
+++ b/templates/modules/layout.html
@@ -23,6 +23,16 @@
--size-theme-font: [(${theme.config.style.font_size})];
}
+
+