Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/footer.html')
-rw-r--r--layouts/partials/footer.html40
1 files changed, 40 insertions, 0 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..6462b80
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,40 @@
+<!-- Set SVG bundle -->
+{{ $icons := (.Scratch.Get "svgBundle").RelPermalink }}
+
+<!-- Custom footer or default copyright -->
+{{ if or (templates.Exists "partials/custom/footer") (templates.Exists "partials/custom/footer.html") }}
+ {{ partialCached "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 }}
+
+
+<!-- Fancy stuff -->
+<aside class="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 }}{{ .Site.Params.style.darkAccent }}{{ else }}{{ .Site.Params.style.lightAccent }}{{ end }}" title="{{ T "change_accent" }}"><datalist id="presets"><option value="{{ .Site.Params.style.lightAccent }}"><option value="{{ .Site.Params.style.darkAccent }}"><!-- Extra colors -->{{- range .Site.Params.style.presets -}}<option value="{{ . }}">{{ end }}</datalist>
+</aside>
+
+<!-- noscript notice -->
+{{ if .Site.Params.hasNoscriptNotice }}
+ <noscript>
+ <p class="noscript">{{ T "noscript" }}</p>
+ </noscript>
+{{ end }}