🐛 Fixed the post creative commons link & post end style only work in page section.
This commit is contained in:
parent
892e13a848
commit
42f4028f2d
@ -7,6 +7,7 @@
|
|||||||
baseURL: /
|
baseURL: /
|
||||||
|
|
||||||
theme: hugo-theme-next
|
theme: hugo-theme-next
|
||||||
|
canonifyURLs: true
|
||||||
|
|
||||||
paginate: 8
|
paginate: 8
|
||||||
|
|
||||||
|
@ -23,8 +23,11 @@
|
|||||||
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
|
{{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }}
|
||||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
|
||||||
<link rel="stylesheet" href="/css/hover.css">
|
<link rel="stylesheet" href="/css/hover.css">
|
||||||
|
{{- if .IsPage }}
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.post-footer hr:after {
|
.post-footer hr:after {
|
||||||
content: "{{ .Site.Params.postFooter.endLineTip }}";
|
content: "{{ .Site.Params.postFooter.endLineTip }}";
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
{{- end }}
|
||||||
|
|
@ -19,16 +19,15 @@
|
|||||||
{{- if isset .Params "link" }}
|
{{- if isset .Params "link" }}
|
||||||
<strong>{{ print (T "PostCROriginLink") (T "SymbolColon") }} </strong>
|
<strong>{{ print (T "PostCROriginLink") (T "SymbolColon") }} </strong>
|
||||||
<a target="_blank" href="{{ .Params.OriginLink }}" title="{{ .Title }}">{{ .Params.Link }}</a>
|
<a target="_blank" href="{{ .Params.OriginLink }}" title="{{ .Title }}">{{ .Params.Link }}</a>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<strong>{{ print (T "PostCRLink") (T "SymbolColon") }}</strong>
|
<strong>{{ print (T "PostCRLink") (T "SymbolColon") }}</strong>
|
||||||
<a href="{{ .RelPermalink | absLangURL }}" title="{{ .Title }}">{{ .Permalink }}</a>
|
<a href="{{ .RelPermalink | absLangURL }}" title="{{ .Title }}">{{ .RelPermalink | absLangURL }}</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</li>
|
</li>
|
||||||
<li class="post-copyright-license">
|
<li class="post-copyright-license">
|
||||||
<strong>{{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} </strong>
|
<strong>{{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} </strong>
|
||||||
{{- $ccText := .Site.Params.creativeCommons.license | upper }}
|
{{- $ccText := .Site.Params.creativeCommons.license | upper }}
|
||||||
{{- $lang := .Scratch.Get "lang" }}
|
{{- $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 }}
|
||||||
{{- $ccLink := printf "<a target='_blank' href='https://creativecommons.org/licenses/by-nc-sa/4.0/deed.%s'>%s</a>" (substr $lang 0 2) $ccText }}
|
|
||||||
{{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }}
|
{{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user