hugo-theme-more-contentful/layouts/partials/footer.html
Gabriel Arazas 77a306a0f5 Update the layout and the list template
I've also made small improvements such as adding the appropriate label
for the main footer.
2021-01-21 03:16:26 +08:00

43 lines
1.4 KiB
HTML

<footer aria-label="Site footer">
<!-- A convenient back to top link. -->
<p><a href="#top">{{ i18n "back_to_top" | default "Back to top" }}</a></p>
<!-- Linking to other languages' homepage. -->
{{ if $.Site.IsMultiLingual }}
<p>{{ i18n "multilingual" }}:
<span class="list site__languages">
{{ 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 }}
<ul class="list site__socials">
{{ $useImage := index . "useImage" | default false }}
{{ $links := sort .links "id" "asc" }}
{{ $links = sort $links "weight" "asc" }}
{{- range $links -}}
<li>
<a {{ if $useImage }}class="site__social-icon"{{ end }} rel="me" href="{{ .url | absLangURL }}" aria-label="{{ with .name }}{{ . }}{{ else }}{{ .id }}{{ end }}">
{{- if $useImage }}
{{- partial "components/icon.html" (dict "id" .id "output" "icons/brand/%s.svg" "template" "templates/simple-icon.svg") }}
{{- else }}
{{- .name }}
{{- end }}
</a>
</li>
{{- end -}}
</ul>
{{ end }}
<!-- Copyright info. -->
<p>{{ with $.Site.Copyright }}{{ . | markdownify }}{{ else }}© {{ now.Year }} {{ with $.Site.Author.name }}{{ . }}{{ else }}{{ $.Site.Title }}{{ end }}{{ end }}</p>
</footer>