Files
website/layouts/partials/deprecation-warning.html
T
Patrice Chalin 659dd4b904 Add class blog-outdated-warning
Co-authored-by: Tim Bannister <tim@scalefactory.com>
2022-02-01 15:41:54 -05:00

23 lines
950 B
HTML

{{ if (.Site.Param "deprecated") }}
<section id="deprecation-warning">
<div class="content deprecation-warning pageinfo">
<h3>
{{ T "deprecation_title" }} {{ .Param "version" }}
</h3>
<p> Kubernetes {{ .Param "version" }} {{ T "deprecation_warning" }}
<a href="{{ site.Params.currentUrl }}">{{ T "latest_version" }}</a>
</p>
</div>
</section>
{{ else if and (eq .Section "blog") .Date (.Date.Before (now.AddDate -1 0 0)) -}}
{{ $title := .Param "outdated_page.title" | default (T "outdated_page_title") -}}
{{ $msg := .Param "outdated_page.message" | default (T "outdated_page_message") -}}
{{ $reason := .Param "outdated_page.reason" | default (T "outdated_page_reason") -}}
{{ $msg = replaceRE "REASON" $reason $msg -}}
<section id="deprecation-warning" class="blog-outdated-warning">
<div class="content deprecation-warning pageinfo">
<h3>{{ $title }}</h3>
<p> {{ $msg }}</p>
</div>
</section>
{{ end }}