Browse Source

【修复】优化 Markdown 中图表的显示

- 在 markdown.css 文件中添加了针对 Mermaid 图表的样式
- 确保图表在容器中按比例缩放
PJ568 1 year ago
parent
commit
b13a7221ba
3 changed files with 7 additions and 2 deletions
  1. 1 1
      Cargo.lock
  2. 1 1
      Cargo.toml
  3. 5 0
      client/css/markdown.css

+ 1 - 1
Cargo.lock

@@ -2449,7 +2449,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
 
 
 [[package]]
 [[package]]
 name = "yaa"
 name = "yaa"
-version = "2.13.2"
+version = "2.13.3"
 dependencies = [
 dependencies = [
  "actix-cors",
  "actix-cors",
  "actix-web",
  "actix-web",

+ 1 - 1
Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 [package]
 name = "yaa"
 name = "yaa"
-version = "2.13.2"
+version = "2.13.3"
 edition = "2024"
 edition = "2024"
 
 
 [dependencies]
 [dependencies]

+ 5 - 0
client/css/markdown.css

@@ -115,4 +115,9 @@
 
 
 .yaa-container table thead tr:first-child>* {
 .yaa-container table thead tr:first-child>* {
   border-top: .1rem solid transparent;
   border-top: .1rem solid transparent;
+}
+
+.yaa-container svg[id^="mermaid-"][width][height][viewBox] {
+  width: 100%;
+  height: auto;
 }
 }