diff options
Diffstat (limited to 'layouts/partials/footer.html')
-rw-r--r-- | layouts/partials/footer.html | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 84c2bc3..9ea8cee 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,3 @@ -<!-- Get default accent colors --> -{{ $darkAccent := .Site.Params.Style.darkAccent | default .Site.Data.default.style.darkAccent }} -{{ $lightAccent := .Site.Params.Style.lightAccent | default .Site.Data.default.style.lightAccent }} - <!-- Custom or default copyright --> {{ if or (templates.Exists "partials/custom/copyright") (templates.Exists "partials/custom/copyright.html") }} {{ partial "custom/copyright" . }} @@ -16,26 +12,16 @@ {{ if gt (len .Translations) 0 }} - {{ $processedKeys := slice }} + {{ $processedLangs := slice }} {{ range .Translations }} - {{ $currentKey := printf "<a rel=\"alternate\" hreflang=\"%s\" href=\"%s\">%s</a>" .Language.Lang .RelPermalink .Language.LanguageName }} - {{ $processedKeys = $processedKeys | append $currentKey }} + {{ $currentLang := printf "<a rel=\"alternate\" hreflang=\"%s\" href=\"%s\">%s</a>" .Language.Lang .RelPermalink .Language.LanguageName }} + {{ $processedLangs = $processedLangs | append $currentLang }} {{ end }} - <p>{{ T "alsoAvailable" }}: {{ delimit $processedKeys ", " (T "and") }}.</p> + <p>{{ T "alsoAvailable" }}: {{ delimit $processedLangs ", " (T "and") }}.</p> {{ end }} - <!-- Footer button and color picker --> -<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"><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 }} +{{ partialCached "footer-opt" . }} |