diff --git a/settings.yaml b/settings.yaml
index 865f7f9..f5ba4e8 100644
--- a/settings.yaml
+++ b/settings.yaml
@@ -51,6 +51,13 @@ spec:
value: false
help: 开启后文章内容中的 table 会占满正文内容区域宽度
+ - $formkit: text
+ label: 正文媒体最大宽度
+ name: media_max_width
+ value:
+ placeholder: "60%"
+ help: 控制文章内容中图片、视频、figure 的最大宽度, 留空使用主题默认值
+
- $formkit: checkbox
label: 使用系统字体
name: system_font_enable
diff --git a/src/styles/main.scss b/src/styles/main.scss
index 39f0c26..302955f 100644
--- a/src/styles/main.scss
+++ b/src/styles/main.scss
@@ -26,6 +26,7 @@
--lig-theme-font: none;
--width-theme-border: calc(var(--size-theme-font) * 0.125);
--width-theme-table-border: calc(var(--size-theme-font) * 0.0625);
+ --width-theme-media-max: 60%;
--style-theme-border: solid;
--style-theme-table-border: dashed;
--style-theme-title-divider: dashed;
@@ -100,8 +101,6 @@ body {
}
body[layout_mode='fullscreen'] {
- --width-theme-media-max: calc(var(--size-theme-font) * 75);
-
.wrapper {
display: block;
}
@@ -121,7 +120,7 @@ body[layout_mode='fullscreen'] {
.content img,
.content video,
.content figure {
- max-width: 60%;
+ max-width: var(--width-theme-media-max);
margin-left: auto;
margin-right: auto;
}
diff --git a/templates/modules/layout.html b/templates/modules/layout.html
index 0767c5d..c347611 100644
--- a/templates/modules/layout.html
+++ b/templates/modules/layout.html
@@ -137,6 +137,11 @@
+