Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dillonzq/LoveIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2022-05-10 08:24:16 +0300
committerDillon <dillonzq@outlook.com>2022-05-10 08:24:16 +0300
commit9cac6b4ffed5d6badf4c6539915a1a5a968247fa (patch)
treea841bc6d7604db28b6a5a569310a3a5489be8a0f /layouts
parenta19e0ed1ac41f070a7b96592a5bd459955f78615 (diff)
feat: update echarts theme config
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/assets.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html
index 27af3fda..91e77224 100644
--- a/layouts/partials/assets.html
+++ b/layouts/partials/assets.html
@@ -136,8 +136,9 @@
{{- if (.Scratch.Get "this").echarts -}}
{{- $source := $cdn.echartsJS | default "lib/echarts/echarts.min.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
- {{- dict "Source" "lib/echarts/theme/macarons.js" "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
- {{- dict "Source" "lib/echarts/theme/chalk.js" "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
+ {{- $lightTheme := resources.Get "lib/echarts/theme/light.yml" | transform.Unmarshal -}}
+ {{- $darkTheme := resources.Get "lib/echarts/theme/dark.yml" | transform.Unmarshal -}}
+ {{- $config = dict "lightTheme" $lightTheme "darkTheme" $darkTheme | dict "echarts" | merge $config -}}
{{- end -}}
{{- /* Mapbox GL */ -}}