selfprivacy.org/_vendor/github.com/google/docsy/layouts/partials/footer/copyright.html

42 lines
964 B
HTML
Raw Normal View History

2024-04-25 22:15:39 +00:00
{{ $page := .Page -}}
{{ with .Site.Params.copyright -}}
{{ $fromYear := "" -}}
{{ $toYear := "" -}}
{{ $authors := "" -}}
{{ if reflect.IsMap . -}}
{{ $fromYear = .from_year -}}
{{ $toYear = .to_year -}}
{{ $authors = .authors -}}
{{ else -}}
{{ $authors = . -}}
{{ end -}}
<span class="td-footer__copyright">&copy;
{{ with $fromYear -}}
{{ . }}&ndash;
{{- end -}}
{{ $toYear | default now.Year }}
<span class="td-footer__authors">
{{- $authors
| default (printf "%s Authors" ($.Site.Title | default "Site"))
| $page.RenderString -}}
</span>
{{- /* Trim WS */ -}}
</span>
{{- with T "footer_all_rights_reserved" -}}
<span class="td-footer__all_rights_reserved">
{{- . -}}
</span>
{{- end }}
{{- else -}}
{{ with .Site.Copyright -}}
<span class="td-footer__copyright">
{{- . | $page.RenderString -}}
</span>
{{- end -}}
{{ end -}}