forked from google/docsy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopyright.html
41 lines (36 loc) · 964 Bytes
/
copyright.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{{ $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">©
{{ with $fromYear -}}
{{ . }}–
{{- 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 -}}