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