mirror of
https://github.com/jbowdre/virtuallypotato.git
synced 2024-12-22 11:12:18 +00:00
reference old_content label in localization file
This commit is contained in:
parent
189f70e790
commit
30b34cf0b3
2 changed files with 12 additions and 9 deletions
|
@ -34,5 +34,8 @@ other = "Query is too short"
|
|||
[type_to_search]
|
||||
other = "Type to search"
|
||||
|
||||
[old_content]
|
||||
[old_content_label]
|
||||
other = "Technology keeps moving but this post has not."
|
||||
|
||||
[old_content_note]
|
||||
other = "What you're about to read hasn't been updated in more than a year. The information may be out of date. Drop a comment below if you find something that needs updating."
|
|
@ -1,7 +1,7 @@
|
|||
{{- define "main" }}
|
||||
{{- $s := .Site.Params }}
|
||||
{{- $p := .Params }}
|
||||
{{- $ageDays := div (sub now.Unix .Date.Unix) 86400 }}
|
||||
{{- $ageDays := div (sub now.Unix .Date.Unix) 86400 -}}
|
||||
{{- $scratch := newScratch }}
|
||||
{{- if isset $p "image" }}
|
||||
{{- $scratch.Set "image" $p.image }}
|
||||
|
@ -15,14 +15,14 @@
|
|||
{{- $t := .Title }}
|
||||
<h1 class="post_title">{{ $t }}</h1>
|
||||
{{- partial "post-meta" . }}
|
||||
{{ with .Param "lastmod" }}
|
||||
{{ $ageDays = div (sub now.Unix .Unix) 86400 }}
|
||||
{{ end }}
|
||||
{{ if gt $ageDays 365 }}
|
||||
<div class="notices info"><div class="label">Technology keeps moving but this post has not.</div>
|
||||
<i>{{ T "old_content" }}</i>
|
||||
{{- with .Param "lastmod" -}}
|
||||
{{- $ageDays = div (sub now.Unix .Unix) 86400 -}}
|
||||
{{- end -}}
|
||||
{{- if gt $ageDays 365 -}}
|
||||
<div class="notices info"><div class="label">{{- T "old_content_label" -}}</div>
|
||||
<i>{{- T "old_content_note" -}}</i>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{- partial "image-feature" . }}
|
||||
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) ($s.toc) }}
|
||||
<div class="post_toc">
|
||||
|
|
Loading…
Reference in a new issue