blob: 75eecde18f0d15b82335f6ba8a60efc2b5d48bad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<!-- Get SVG bundle -->
{{ $icons := (.Scratch.Get "svgBundle").RelPermalink }}
<!-- Get default accent colors -->
{{ $darkAccent := .Scratch.Get "darkAccent" }}
{{ $lightAccent := .Scratch.Get "lightAccent" }}
<!-- Custom footer or default copyright -->
{{ if or (templates.Exists "partials/custom/footer") (templates.Exists "partials/custom/footer.html") }}
{{ partial "custom/footer" . }}
{{ else }}
<p>{{ .Site.Copyright | markdownify | emojify }}</p>
{{ end }}
<!--
TODO
Maybe I should rethink this
-->
{{ if gt (len .Translations) 0 }}
{{ $processedKeys := slice }}
{{ range .Translations }}
{{ $currentKey := printf "<a rel=\"alternate\" hreflang=\"%s\" href=\"%s\">%s</a>" .Language.Lang .RelPermalink .Language.LanguageName }}
{{ $processedKeys = $processedKeys | append $currentKey }}
{{ end }}
<p>{{ T "also_available" }}: {{ delimit $processedKeys ", " (T "and") }}.</p>
{{ end }}
<!-- Footer button and color picker -->
<section class="req-js">
<button title="{{ T "change_mode" }}"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><use xlink:href="{{ $icons }}#adjust"/></svg></button><input type="color" list="presets" value="{{ if .Site.Params.Style.isDark }}{{ $darkAccent }}{{ else }}{{ $lightAccent }}{{ end }}" title="{{ T "change_accent" }}" aria-label="{{ T "change_accent" }}"><datalist id="presets"><option value="{{ $lightAccent }}"><option value="{{ $darkAccent }}"><!-- Extra colors -->{{- range .Site.Params.style.presets -}}<option value="{{ . }}">{{ end }}</datalist>
</section>
<!-- noscript notice -->
{{ if .Site.Params.hasNoscriptNotice }}
<noscript>
<p class="noscript">{{ T "noscript" }}</p>
</noscript>
{{ end }}
|