hugo-theme-even/layouts/partials/post/copyright.html

30 lines
1.2 KiB
HTML
Raw Normal View History

{{ if or .Params.contentCopyright (and .Site.Params.contentCopyright (ne .Params.contentCopyright false)) }}
2017-08-27 14:38:42 +00:00
<div class="post-copyright">
<p class="copyright-item">
2018-01-31 14:07:50 +00:00
<span class="item-title">{{ T "author" }}</span>
<span class="item-content">{{ if .Params.author }}{{ .Params.author | safeHTML }}{{ else }}{{ .Site.Author.name | safeHTML }}{{ end }}</span>
2017-08-27 14:38:42 +00:00
</p>
<p class="copyright-item">
2018-01-31 14:07:50 +00:00
<span class="item-title">{{ T "lastMod" }}</span>
<span class="item-content">{{ .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}</span>
2017-08-27 14:38:42 +00:00
</p>
{{ if $.Site.Params.linkToMarkDown -}}
{{ with $.OutputFormats.Get "markdown" -}}
<p class="copyright-item">
2018-01-31 14:07:50 +00:00
<span class="item-title">{{ T "markdown" }}</span>
<span class="item-content"><a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">{{ T "seeMarkDown" }}</a></span>
2017-08-27 14:38:42 +00:00
</p>
{{- end }}
{{- end }}
<p class="copyright-item">
2018-01-31 14:07:50 +00:00
<span class="item-title">{{ T "license" }}</span>
<span class="item-content">
{{- if .Params.contentCopyright -}}
{{ .Params.contentCopyright | safeHTML }}
{{- else -}}
{{ .Site.Params.contentCopyright | safeHTML }}
{{- end -}}
</span>
2017-08-27 14:38:42 +00:00
</p>
</div>
{{- end }}