add alert to docs

This commit is contained in:
jrcreative
2021-03-03 12:27:59 -08:00
parent c0e67713ae
commit 75e6537133
4 changed files with 84 additions and 2 deletions
+15 -1
View File
@@ -14,9 +14,23 @@
<div class="col-4"></div>
</div>
<div class="head-blank"></div>
<div class="head-blank">
</div>
<div class="row max-sized contents-container background-base-gray-side">
{{ $url := urls.Parse .Permalink }}
{{ $path := split $url.Path "/" }}
{{ $product := index $path 1 }}
{{ $version := index $path 2 }}
{{ $productVersion := printf "%s/%s" $product $version}}
{{ if eq $productVersion "rancher/v2.x" }}
<div class="alert alert-notice">
<strong>We are transitioning to versioned documentation.</strong> The v2.x docs will no longer be maintained. For Rancher v2.5 docs, go <a href="https://rancher.com/docs/rancher/v2.5/en/">here.</a> For Rancher v2.0-v2.4 docs, go <a href="https://rancher.com/docs/rancher/v2.0-v2.4/en/">here.</a>
</div>
{{end}}
<div class="
col-xl-3
col-lg-4