Import theme
This commit is contained in:
parent
51769fa6be
commit
c59ffbfeee
127 changed files with 13611 additions and 1 deletions
20
layouts/partials/expirationnote.html
Normal file
20
layouts/partials/expirationnote.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{{- if (eq .Site.Params.oldContentWarning true) -}}
|
||||
{{- $ageDays := div (sub now.Unix .Date.Unix) 86400 -}}
|
||||
{{- $duration := .Site.Params.oldContentDuration -}}
|
||||
|
||||
{{- if and (ne .Type "post") (ne .Type .Site.Params.postSectionName) -}}
|
||||
{{- $duration = 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if (isset .Params "old_content_duration") -}}
|
||||
{{- $duration = .Params.old_content_duration -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if and (gt $ageDays $duration) (ne $duration 0) -}}
|
||||
<div class="alert">
|
||||
<div class="alert__indicator">!</div>
|
||||
{{ i18n "old_content_warning" (dict "Count" $duration) }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- end -}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue