From 627a57c5e9ed5f92b220083bacacb4b41aa3116c Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Fri, 23 Jan 2026 18:50:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20Mermaid=20?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在设置页功能增强分类中添加 Mermaid 图表设置项 - 支持启用/禁用 Mermaid 渲染 - 支持自定义 CDN 地址(默认 jsdelivr) - 提供 4 种主题选择(默认/森林/暗色/中性) - 在 footer.php 中添加 Mermaid 库加载和初始化逻辑 - 自动识别 language-mermaid 和 mermaid 类的代码块 - 在 style.css 中添加 Mermaid 图表样式 - 支持响应式布局和夜间模式 - 使用方式:在代码块中指定语言为 mermaid --- footer.php | 48 +++++++++++++++++++++++++++++++++++ settings.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ style.css | 32 +++++++++++++++++++++++ 3 files changed, 152 insertions(+) diff --git a/footer.php b/footer.php index 0d428b0..d07f187 100644 --- a/footer.php +++ b/footer.php @@ -147,6 +147,54 @@ + + + + + + + + diff --git a/settings.php b/settings.php index f60404e..5f165e5 100644 --- a/settings.php +++ b/settings.php @@ -2824,6 +2824,70 @@ function themeoptions_page(){ +
//cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js