website: show yellow banner for old version (#4533)

Hopefully this is gets more attention than the yellow "older" button
in the version picker.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
This commit is contained in:
Stephan Renatus
2022-04-01 12:57:37 +02:00
committed by GitHub
parent 3cfa3c3259
commit 62f857b536
@@ -5,13 +5,19 @@
{{- end -}}
{{ $version := index (split .File.Path "/") 1 }}
<article class="article">
{{ with (eq $version "edge") }}
{{- if (eq $version "edge") }}
<div class="message is-danger">
<div class="message-body">
This version is still under development! Latest stable release is <a href="/docs/latest">{{ $latest }}</a>
</div>
</div>
{{ end }}
{{- else if (and (ne $version "latest") (ne $version $latest)) }}
<div class="message is-warning">
<div class="message-body">
These are the docs for an older version of OPA. Latest stable release is <a href="/docs/latest">{{ $latest }}</a>
</div>
</div>
{{- end }}
<div class="container">
{{ partial "docs/hero.html" . }}