mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-24 17:16:31 -05:00
24 lines
591 B
HTML
24 lines
591 B
HTML
|
|
||
|
{{ if and (not .Date.IsZero) .Site.Params.warnPostOlderThanXYears }}
|
||
|
|
||
|
|
||
|
{{ $ageYears := div (sub now.Unix .Date.Unix) 31536000 }}
|
||
|
|
||
|
{{ if .Lastmod }}
|
||
|
{{ $ageYears := div (sub now.Unix .Lastmod.Unix) 31536000 }}
|
||
|
{{ end }}
|
||
|
|
||
|
{{ if gt $ageYears .Site.Params.warnPostOlderThanXYears }}
|
||
|
<div style="margin-top: 1rem; border: 1px solid black; padding: 1rem;">
|
||
|
<em>Warning</em>: This post has not been modified
|
||
|
for over {{ .Site.Params.warnPostOlderThanXYears }} years. For technical posts,
|
||
|
make sure that it is still relevant.
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
|
||
|
|
||
|
{{ end }}
|
||
|
|
||
|
|
||
|
|