From 2772a5b9bd29d4ef39ee95f4b32bc33b0142a434 Mon Sep 17 00:00:00 2001 From: elonz Date: Fri, 30 Jul 2021 10:09:21 +0800 Subject: [PATCH] add: mermaid theme in dark thems Change-Id: Id26a98ed7b60ed512dd1299004adcd7d472865b6 --- src/themes/bear-palettes/ayu-mirage.scss | 1 + src/themes/bear-palettes/charcoal.scss | 1 + src/themes/bear-palettes/cobalt.scss | 1 + src/themes/bear-palettes/dark-graphite.scss | 1 + src/themes/bear-palettes/dieci.scss | 1 + src/themes/bear-palettes/dracula.scss | 1 + src/themes/bear-palettes/gotham.scss | 1 + src/themes/bear-palettes/lighthouse.scss | 1 + src/themes/bear-palettes/nord.scss | 1 + src/themes/bear-palettes/panic.scss | 1 + src/themes/bear-palettes/solarized-dark.scss | 1 + src/themes/bear-palettes/toothpaste.scss | 1 + src/themes/core/typora-base.scss | 2 ++ src/themes/variables/lark.scss | 2 ++ src/themes/variables/typora-bear-default.scss | 2 ++ 15 files changed, 18 insertions(+) diff --git a/src/themes/bear-palettes/ayu-mirage.scss b/src/themes/bear-palettes/ayu-mirage.scss index afebd0e..4cd6cc1 100644 --- a/src/themes/bear-palettes/ayu-mirage.scss +++ b/src/themes/bear-palettes/ayu-mirage.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(31, 35, 47, 1.00); $font-color: rgba(217, 215, 209, 1.00); $del-font-color: rgba(120, 126, 140, 1.00); diff --git a/src/themes/bear-palettes/charcoal.scss b/src/themes/bear-palettes/charcoal.scss index 93ab1b3..96400eb 100644 --- a/src/themes/bear-palettes/charcoal.scss +++ b/src/themes/bear-palettes/charcoal.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(46, 50, 53, 1.00); $font-color: rgba(166, 166, 166, 1.00); $del-font-color: rgba(122, 122, 122, 1.00); diff --git a/src/themes/bear-palettes/cobalt.scss b/src/themes/bear-palettes/cobalt.scss index 34118bc..17b37b5 100644 --- a/src/themes/bear-palettes/cobalt.scss +++ b/src/themes/bear-palettes/cobalt.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(20, 39, 56, 1.00); $font-color: rgba(219, 240, 239, 1.00); $del-font-color: rgba(172, 191, 195, 1.00); diff --git a/src/themes/bear-palettes/dark-graphite.scss b/src/themes/bear-palettes/dark-graphite.scss index 7779495..c35e867 100644 --- a/src/themes/bear-palettes/dark-graphite.scss +++ b/src/themes/bear-palettes/dark-graphite.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(30, 32, 34, 1.0); $font-color: rgba(221, 221, 221, 1.0); $del-font-color: rgba(111, 115, 115, 1.0); diff --git a/src/themes/bear-palettes/dieci.scss b/src/themes/bear-palettes/dieci.scss index efe770f..e2df5f6 100644 --- a/src/themes/bear-palettes/dieci.scss +++ b/src/themes/bear-palettes/dieci.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(0, 0, 0, 1.0); $font-color: rgba(212, 212, 212, 1.00); $del-font-color: rgba(146, 147, 146, 1.00); diff --git a/src/themes/bear-palettes/dracula.scss b/src/themes/bear-palettes/dracula.scss index 80e0e75..57d874a 100644 --- a/src/themes/bear-palettes/dracula.scss +++ b/src/themes/bear-palettes/dracula.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(53, 56, 70, 1); $font-color: rgba(255, 255, 255, 1.00); $del-font-color: rgba(178, 184, 163, 1.00); diff --git a/src/themes/bear-palettes/gotham.scss b/src/themes/bear-palettes/gotham.scss index 03bc4b4..bc7b098 100644 --- a/src/themes/bear-palettes/gotham.scss +++ b/src/themes/bear-palettes/gotham.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(17, 21, 28, 1.00); $font-color: rgba(106, 169, 185, 1.00); $del-font-color: rgba(89, 156, 171, 0.70); diff --git a/src/themes/bear-palettes/lighthouse.scss b/src/themes/bear-palettes/lighthouse.scss index b47add8..1008651 100644 --- a/src/themes/bear-palettes/lighthouse.scss +++ b/src/themes/bear-palettes/lighthouse.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(24, 24, 30, 1.00); $font-color: rgba(253, 250, 224, 1.00); $del-font-color: rgba(204, 204, 204, 1.00); diff --git a/src/themes/bear-palettes/nord.scss b/src/themes/bear-palettes/nord.scss index aed7ea2..d0a21db 100644 --- a/src/themes/bear-palettes/nord.scss +++ b/src/themes/bear-palettes/nord.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(47, 52, 64, 1.00); $font-color: rgba(237, 238, 243, 1.00); $del-font-color: rgba(160, 163, 171, 1.00); diff --git a/src/themes/bear-palettes/panic.scss b/src/themes/bear-palettes/panic.scss index b1a611e..0d948e1 100644 --- a/src/themes/bear-palettes/panic.scss +++ b/src/themes/bear-palettes/panic.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(17, 28, 42, 1.00); $font-color: rgba(246, 247, 238, 1.00); $del-font-color: rgba(176, 176, 176, 1.00); diff --git a/src/themes/bear-palettes/solarized-dark.scss b/src/themes/bear-palettes/solarized-dark.scss index 1add030..2e7ef54 100644 --- a/src/themes/bear-palettes/solarized-dark.scss +++ b/src/themes/bear-palettes/solarized-dark.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(11, 55, 66, 1.00); $font-color: rgba(155, 166, 164, 1.00); $del-font-color: rgba(106, 134, 144, 1.00); diff --git a/src/themes/bear-palettes/toothpaste.scss b/src/themes/bear-palettes/toothpaste.scss index 8903023..39bd5d3 100644 --- a/src/themes/bear-palettes/toothpaste.scss +++ b/src/themes/bear-palettes/toothpaste.scss @@ -1,5 +1,6 @@ @import "default.scss"; +$mermaid-theme: dark; $body-bg-color: rgba(34, 46, 51, 1.00); $font-color: rgba(220, 227, 232, 1.00); $del-font-color: rgba(191, 191, 191, 1.00); diff --git a/src/themes/core/typora-base.scss b/src/themes/core/typora-base.scss index 4e896f5..187c9aa 100644 --- a/src/themes/core/typora-base.scss +++ b/src/themes/core/typora-base.scss @@ -19,6 +19,8 @@ --meta-content-color: #{$primary-color}; --search-select-text-color: #{$primary-color}; --heading-char-color: #{$primary-color}; + /* Mermaid diagrams*/ + --mermaid-theme: #{$mermaid-theme}; } #write { diff --git a/src/themes/variables/lark.scss b/src/themes/variables/lark.scss index 51f6a2b..11b0e3f 100644 --- a/src/themes/variables/lark.scss +++ b/src/themes/variables/lark.scss @@ -1,5 +1,7 @@ @import "default.scss"; +$mermaid-theme: default; + /* color */ $primary-color: #3370ff; $accent-color: rgb(36, 91, 219); // 粗体的颜色 diff --git a/src/themes/variables/typora-bear-default.scss b/src/themes/variables/typora-bear-default.scss index 5c20eab..597a57b 100644 --- a/src/themes/variables/typora-bear-default.scss +++ b/src/themes/variables/typora-bear-default.scss @@ -5,6 +5,8 @@ @import "default.scss"; +$mermaid-theme: default; + $md-body-max-width: 860px; $prism-font-size: 14px; // TODO: 这里的命名可能要换一下,比如 prism => code-block