2022-06-03 22:37:33 +08:00
|
|
|
{{- if .Site.Params.creativeCommons.post }}
|
|
|
|
<div class="post-copyright">
|
|
|
|
<img src="/imgs/cc/cc.svg" width="75" height="75" align="right" />
|
|
|
|
<ul>
|
2022-06-04 17:54:34 +08:00
|
|
|
<li class="post-copyright-title">
|
|
|
|
<strong>{{ print (T "PostCRTitle") (T "SymbolColon") }}</strong>
|
|
|
|
{{ .Title }}
|
|
|
|
</li>
|
2022-06-03 22:37:33 +08:00
|
|
|
<li class="post-copyright-author">
|
|
|
|
{{- if isset .Params "author" }}
|
|
|
|
<strong>{{ print (T "PostCROriginAuthor") (T "SymbolColon") }} </strong>
|
|
|
|
{{ .Params.Author }}
|
|
|
|
{{- else }}
|
|
|
|
<strong>{{ print (T "PostCRAuthor") (T "SymbolColon") }} </strong>
|
|
|
|
{{ .Site.Params.author }}
|
|
|
|
{{- end }}
|
|
|
|
</li>
|
|
|
|
<li class="post-copyright-link">
|
2022-06-08 14:51:30 +08:00
|
|
|
{{- if isset .Params "link" }}
|
2022-06-03 22:37:33 +08:00
|
|
|
<strong>{{ print (T "PostCROriginLink") (T "SymbolColon") }} </strong>
|
2022-06-08 14:51:30 +08:00
|
|
|
<a target="_blank" href="{{ .Params.OriginLink }}" title="{{ .Title }}">{{ .Params.Link }}</a>
|
2022-06-16 19:57:49 +08:00
|
|
|
{{- else }}
|
2022-06-03 22:37:33 +08:00
|
|
|
<strong>{{ print (T "PostCRLink") (T "SymbolColon") }}</strong>
|
2022-06-16 20:15:15 +08:00
|
|
|
<a href="{{ .Permalink | absLangURL }}" title="{{ .Title }}">{{ .Permalink | absLangURL }}</a>
|
2022-06-03 22:37:33 +08:00
|
|
|
{{- end }}
|
|
|
|
</li>
|
|
|
|
<li class="post-copyright-license">
|
2022-06-04 10:43:00 +08:00
|
|
|
<strong>{{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} </strong>
|
2022-06-03 22:37:33 +08:00
|
|
|
{{- $ccText := .Site.Params.creativeCommons.license | upper }}
|
2022-06-16 19:57:49 +08:00
|
|
|
{{- $ccLink := printf "<a target='_blank' href='https://creativecommons.org/licenses/by-nc-sa/4.0/deed.%s'>%s</a>" (substr .Site.LanguageCode 0 2) $ccText }}
|
2022-06-03 22:37:33 +08:00
|
|
|
{{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }}
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
{{- end }}
|