diff --git a/settings.yaml b/settings.yaml index 2c3cffa..865f7f9 100644 --- a/settings.yaml +++ b/settings.yaml @@ -45,6 +45,12 @@ spec: value: false help: 开启后隐藏左右侧边栏并让正文区域占满可用宽度 + - $formkit: checkbox + label: 表格宽度铺满父元素 + name: table_full_width + value: false + help: 开启后文章内容中的 table 会占满正文内容区域宽度 + - $formkit: checkbox label: 使用系统字体 name: system_font_enable diff --git a/src/styles/main.scss b/src/styles/main.scss index 1d023f0..39f0c26 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -118,10 +118,6 @@ body[layout_mode='fullscreen'] { max-width: none !important; } - .content table { - width: 100%; - } - .content img, .content video, .content figure { @@ -131,6 +127,12 @@ body[layout_mode='fullscreen'] { } } +body[table_full_width='true'] { + .content table { + width: 100%; + } +} + @media (max-width: 1024px) { .sidebar-left, .sidebar-right { diff --git a/templates/modules/layout.html b/templates/modules/layout.html index 4c3d690..0767c5d 100644 --- a/templates/modules/layout.html +++ b/templates/modules/layout.html @@ -177,7 +177,8 @@ - +