jlelse
/
Indieroad
Archived
1
Fork 0

Add warning for old content (off by default)

This commit is contained in:
Jan-Lukas Else 2020-02-17 18:26:23 +01:00
parent 785b8ba9de
commit 6aa16e70a3
5 changed files with 21 additions and 2 deletions

View File

@ -515,6 +515,11 @@ select {
}
}
.oldcontent {
padding: 5px;
@include color-border(border, 1px, solid, border);
}
.content {
a {
font-weight: 700;

View File

@ -56,4 +56,7 @@
translation: "Interaktionen"
- id: translations
translation: Übersetzungen
translation: Übersetzungen
- id: oldcontent
translation: Dieser Eintrag ist bereits über ein Jahr alt. Er ist möglicherweise nicht mehr aktuell. Meinungen können sich geändert haben.

View File

@ -59,4 +59,7 @@
translation: "Also on"
- id: translations
translation: Translations
translation: Translations
- id: oldcontent
translation: This entry is already over one year old. It may no longer be up to date. Opinions may have changed.

View File

@ -11,6 +11,7 @@
{{ end }}
{{ end }}
</header>
{{ partial "oldcontentwarning" . }}
<div class="e-content content clearfix">
{{ with .Params.audio }}
<p><audio controls preload="metadata" style="width: 100%;"><source src="{{ . }}"/></audio></p>

View File

@ -0,0 +1,7 @@
{{ if .Param "oldcontentwarning" }}
{{ if .Date }}
{{ if (.Date.AddDate 1 0 0).Before now }}
<p class="oldcontent"><i><b>{{ ":warning:" | emojify }} {{ T "oldcontent" }}</i></b></p>
{{ end }}
{{ end }}
{{ end }}