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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <jimmehcai@gmail.com>2020-09-17 20:48:21 +0300
committerJimmy Cai <jimmehcai@gmail.com>2020-09-17 20:48:21 +0300
commit96ff911c6e83140925420073b1abe16afa445567 (patch)
tree589b039de5eefa5dfc0cb036095c0167d78580df /layouts
parent845834baa6841d79ff737ef810a0270d02d21856 (diff)
feat(article): better syntax highlight style
Adapt to light & dark mode
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/footer/components/highlight.html4
-rw-r--r--layouts/partials/footer/include.html1
2 files changed, 5 insertions, 0 deletions
diff --git a/layouts/partials/footer/components/highlight.html b/layouts/partials/footer/components/highlight.html
new file mode 100644
index 0000000..d428695
--- /dev/null
+++ b/layouts/partials/footer/components/highlight.html
@@ -0,0 +1,4 @@
+{{- $light := resources.Get "css/highlight/light.css" | minify -}}
+{{- $dark := resources.Get "css/highlight/dark.css" | minify -}}
+<link rel="stylesheet" href="{{ $light.Permalink }}" media="(prefers-color-scheme: light)">
+<link rel="stylesheet" href="{{ $dark.Permalink }}" media="(prefers-color-scheme: dark)"> \ No newline at end of file
diff --git a/layouts/partials/footer/include.html b/layouts/partials/footer/include.html
index 4b50a88..ffa7573 100644
--- a/layouts/partials/footer/include.html
+++ b/layouts/partials/footer/include.html
@@ -1,3 +1,4 @@
{{ partialCached "footer/components/script.html" . }}
{{ partialCached "footer/components/custom-font.html" . }}
+{{ partialCached "footer/components/highlight.html" . }}
{{ partial "footer/custom.html" . }} \ No newline at end of file