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

gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Aguiar <rmaguiar@tuta.io>2022-03-16 19:05:34 +0300
committerRaphael Aguiar <rmaguiar@tuta.io>2022-03-16 19:05:34 +0300
commitb767c4e39893384d6821e357ba6d4c901a5eb9b7 (patch)
treed82c75e66f0b019ee10c942c848988cc16d282ed /layouts/partials/footer-opt.html
parentb7927278b9d88d8f81ce385b74fb53f8048720aa (diff)
Bundle SVGs and a bunch of minor changes and fixes
* Bundle SVGs * Bump KaTeX from 0.15.2 to 0.15.3 * Use ESBuild conditionally (Hugo 0.74+) * A bunch of minor changes and fixes
Diffstat (limited to 'layouts/partials/footer-opt.html')
-rw-r--r--layouts/partials/footer-opt.html11
1 files changed, 7 insertions, 4 deletions
diff --git a/layouts/partials/footer-opt.html b/layouts/partials/footer-opt.html
index 9fb96ee..d31a4d9 100644
--- a/layouts/partials/footer-opt.html
+++ b/layouts/partials/footer-opt.html
@@ -1,11 +1,14 @@
+<!-- Get SVG bundle -->
+{{ $svgBundleLink := (.Page.Scratch.Get "svgBundle").RelPermalink }}
+
<!-- Get default accent colors -->
-{{ $lightAccent := .Site.Params.Style.lightAccent | default .Site.Data.default.style.lightAccent }}
-{{ $darkAccent := .Site.Params.Style.darkAccent | default .Site.Data.default.style.darkAccent }}
+{{ $defaultLightAccent := .Site.Params.Style.lightAccent | default .Site.Data.default.style.lightAccent }}
+{{ $defaultDarkAccent := .Site.Params.Style.darkAccent | default .Site.Data.default.style.darkAccent }}
-{{ $allAccentColors := union (slice $lightAccent $darkAccent) .Site.Params.Style.presets }}
+{{ $allAccentColors := union (slice $defaultLightAccent $defaultDarkAccent) .Site.Params.Style.presets }}
<section class="req-js">
- <button class="outline-dashed" title="{{ T "changeMode" }}"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><use xlink:href="#adjust"/></svg></button><input class="outline-dashed" type="color" list="presets" value="{{ if .Site.Params.Style.isDark }}{{ $darkAccent }}{{ else }}{{ $lightAccent }}{{ end }}" title="{{ T "changeAccent" }}" aria-label="{{ T "changeAccent" }}"><datalist id="presets">{{ range $allAccentColors }}<option value="{{ . }}">{{ end }}</datalist>
+ <button class="outline-dashed" title="{{ T "changeMode" }}"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><use xlink:href="{{ $svgBundleLink }}#adjust"/></svg></button><input class="outline-dashed" type="color" list="presets" value="{{ if .Site.Params.Style.isDark }}{{ $defaultDarkAccent }}{{ else }}{{ $defaultLightAccent }}{{ end }}" title="{{ T "changeAccent" }}" aria-label="{{ T "changeAccent" }}"><datalist id="presets">{{ range $allAccentColors }}<option value="{{ . }}">{{ end }}</datalist>
</section>
<!-- noscript notice -->