From 42a5ebdc71dd06b7424009e996b668db9c9a3af0 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Fri, 19 Sep 2025 17:20:43 +0800 Subject: [PATCH] fix: xypic diagram color at dark theme and update MathJax script loading options --- assets/css/_page/_single.scss | 11 +++++++++++ layouts/_partials/assets.html | 2 +- layouts/_partials/init/index.html | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/assets/css/_page/_single.scss b/assets/css/_page/_single.scss index 0449e09a..c7f544b7 100644 --- a/assets/css/_page/_single.scss +++ b/assets/css/_page/_single.scss @@ -511,6 +511,17 @@ max-width: 100%; overflow-x: auto; overflow-y: hidden; + + // fix the color of xypic diagrams + mjx-xypic { + g { + stroke: currentColor !important; + } + mjx-xypic-object { + color: currentColor !important; + fill: currentColor !important; + } + } } @import '../_partials/_single/alert'; diff --git a/layouts/_partials/assets.html b/layouts/_partials/assets.html index 43957fad..87aa69b6 100644 --- a/layouts/_partials/assets.html +++ b/layouts/_partials/assets.html @@ -324,7 +324,7 @@ FixIt theme assets partial {{- if not hugo.IsProduction -}} {{- $options = dict "sourceMap" "external" | merge $options -}} {{- end -}} - {{- dict "Source" (resources.Get "js/lib/mathjax.js") "Build" $options "Fingerprint" $fingerprint "Async" true "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}} + {{- dict "Source" (resources.Get "js/lib/mathjax.js") "Build" $options "Fingerprint" $fingerprint "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}} {{- end -}} {{- /* Mermaid plugin */ -}} diff --git a/layouts/_partials/init/index.html b/layouts/_partials/init/index.html index 0cd49960..b8036cfb 100644 --- a/layouts/_partials/init/index.html +++ b/layouts/_partials/init/index.html @@ -1,4 +1,4 @@ -{{- hugo.Store.Set "version" "v0.4.0-alpha.2-20250916043850-a228cce0" -}} +{{- hugo.Store.Set "version" "v0.4.0-alpha.2-20250919092044-50488dfb" -}} {{- .Store.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}