diff options
author | Raphael Aguiar <rmaguiar@tuta.io> | 2022-03-16 19:05:34 +0300 |
---|---|---|
committer | Raphael Aguiar <rmaguiar@tuta.io> | 2022-03-16 19:05:34 +0300 |
commit | b767c4e39893384d6821e357ba6d4c901a5eb9b7 (patch) | |
tree | d82c75e66f0b019ee10c942c848988cc16d282ed /layouts/partials/footer-opt.html | |
parent | b7927278b9d88d8f81ce385b74fb53f8048720aa (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.html | 11 |
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 --> |