From d56c61a0464921d20851a45bb6441316b4dce300 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 4 Aug 2025 14:18:36 +0800 Subject: [PATCH] Add supports for docsme plugin (#250) * docsme Signed-off-by: Ryan Wang * Update Signed-off-by: Ryan Wang * Add setting options Signed-off-by: Ryan Wang --------- Signed-off-by: Ryan Wang --- settings.yaml | 17 +++++++++++ src/styles/main.scss | 23 +++++++++++++++ templates/doc-catalog.html | 23 +++++++++++++++ templates/doc.html | 24 ++++++++++++++++ templates/docs.html | 23 +++++++++++++++ templates/modules/base-head.html | 26 +++++++++++++++++ templates/modules/doc-layout.html | 48 +++++++++++++++++++++++++++++++ templates/modules/layout.html | 26 ++--------------- 8 files changed, 186 insertions(+), 24 deletions(-) create mode 100644 templates/doc-catalog.html create mode 100644 templates/doc.html create mode 100644 templates/docs.html create mode 100644 templates/modules/base-head.html create mode 100644 templates/modules/doc-layout.html diff --git a/settings.yaml b/settings.yaml index 604c1d1..746af29 100644 --- a/settings.yaml +++ b/settings.yaml @@ -500,3 +500,20 @@ spec: name: gongan_link label: 公安联网备案跳转链接 value: https://beian.mps.gov.cn/#/query/webSearch + - group: plugin + label: 插件集成 + formSchema: + - $formkit: group + name: docsme + label: Docsme 文档管理 + value: + source: theme + children: + - $formkit: select + name: source + label: 模板来源 + options: + - label: 由此主题提供 + value: theme + - label: 使用插件默认模板 + value: plugin diff --git a/src/styles/main.scss b/src/styles/main.scss index 914256d..70c8405 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -111,3 +111,26 @@ select { padding-right: 1.85em; display: inline-flex; } + +// Custom styles for docsme plugin +.dm-layout, +.dm-header__content { + @apply mx-auto max-w-7xl !important; +} + +.dm-header__content { + @apply px-4 lg:px-6 !important; +} + +.dm-main-content { + @apply mx-auto max-w-7xl !important; + @apply px-4 lg:px-6 !important; +} + +.dm-sidebar__content { + padding: 0 1rem !important; +} + +.dm-header { + z-index: 9 !important; +} diff --git a/templates/doc-catalog.html b/templates/doc-catalog.html new file mode 100644 index 0000000..947912e --- /dev/null +++ b/templates/doc-catalog.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + +
+ + +
+
+ +
diff --git a/templates/doc.html b/templates/doc.html new file mode 100644 index 0000000..05f5127 --- /dev/null +++ b/templates/doc.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + +
+ + +
+
+ +
diff --git a/templates/docs.html b/templates/docs.html new file mode 100644 index 0000000..e6e0a98 --- /dev/null +++ b/templates/docs.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + +
+ +
+
+ +
diff --git a/templates/modules/base-head.html b/templates/modules/base-head.html new file mode 100644 index 0000000..dd7b456 --- /dev/null +++ b/templates/modules/base-head.html @@ -0,0 +1,26 @@ + + + + + + + + + + + diff --git a/templates/modules/doc-layout.html b/templates/modules/doc-layout.html new file mode 100644 index 0000000..343b161 --- /dev/null +++ b/templates/modules/doc-layout.html @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + +
+ +
+ + + + + diff --git a/templates/modules/layout.html b/templates/modules/layout.html index 317f6eb..51fc2df 100644 --- a/templates/modules/layout.html +++ b/templates/modules/layout.html @@ -1,33 +1,11 @@ - - - - - - - - + + -