hugo-theme-more-contentful/layouts/partials/footer.html

42 lines
1.4 KiB
HTML
Raw Normal View History

<footer aria-label="Site footer">
<!-- A convenient back to top link. -->
<a href="#top">{{ i18n "back_to_top" | default "Back to top" }}</a>
<!-- Linking to other languages' homepage. -->
{{ if $.Site.IsMultiLingual }}
2020-11-05 05:54:38 +00:00
<p>{{ i18n "multilingual" }}:
<span class="site__list site__languages">
2020-11-05 05:54:38 +00:00
{{ range $.Site.Languages }}
<a href="{{ . | relURL }}" hreflang="{{ .Lang }}">{{ with .LanguageName }}{{ . }}{{ else }}{{ .Lang }}{{ end }}</a>
{{ end }}
</span>
</p>
{{ end }}
<!-- List all of the social media links -->
{{ with (index $.Site.Data "more-contentful").contacts }}
<nav class="site__list site__socials">
{{ $useImage := index . "useImage" | default false }}
{{ $links := sort .links "id" "asc" }}
{{ $links = sort $links "weight" "asc" }}
{{- range $links -}}
<a {{ if $useImage }}class="site__social-icon"{{ end }} rel="me" href="{{ .url | relLangURL }}" aria-label="{{ with .name }}{{ . }}{{ else }}{{ .id }}{{ end }}">
2020-11-05 05:54:38 +00:00
{{- if $useImage }}
{{- partial "components/simple-icon.html" (dict "id" .id) }}
2020-11-05 05:54:38 +00:00
{{- else }}
{{- .name }}
{{- end }}
</a>
{{- end -}}
</nav>
{{ end }}
{{ $markdownOpt := dict "markup" "markdown" }}
<!-- Copyright info. -->
<p>{{ with $.Site.Copyright }}{{ . | $.Site.RenderPage $markdownOpt }}{{ else }}© {{ now.Year }} {{ with $.Site.Author.name }}{{ . }}{{ else }}{{ $.Site.Title }}{{ end }}{{ end }}</p>
</footer>