blob: d31a4d9540bbc1d524f98ec8fb0a0bf5d73f0fd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!-- Get SVG bundle -->
{{ $svgBundleLink := (.Page.Scratch.Get "svgBundle").RelPermalink }}
<!-- Get default accent colors -->
{{ $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 $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="{{ $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 -->
{{ if .Site.Params.hasNoscriptNotice }}
<noscript>
<p class="noscript">{{ T "noscript" }}</p>
</noscript>
{{ end }}
|