Back to Falco

Supported Versions

layouts/docs/supported-versions.html

latest1.1 KB
Original Source

{{ define "main" }}

{{ partial "docs/content-page" (dict "ctx" . "page" .) }} {{ $versions := .Page.Param "versions" }} {{ $thisPageRelUri := .Page.RelPermalink }} {{ $thisVersionArray := first 2 (split (.Page.Param "version") ".") }} {{ $.Scratch.Set "version-class" (slice "placeholder") }} {{/* "placeholder" is also used later to check whether we opened the */}} {{ range $index, $version := $versions }} {{ $.Scratch.Set "version-class" (slice "") }} {{ $versionArray := split .version "." }} {{ if eq $index 0 }}

{{ T "docs_version_latest_heading" }}

{{ $.Scratch.Set "version-class" ($.Scratch.Get "version-class" | append "version-latest" ) }} {{ end }} {{ if eq $index 1 }}

{{ T "docs_version_other_heading" }}

{{ end }} {{ if eq .version ( delimit $thisVersionArray "." ) }} {{ $.Scratch.Set "version-class" ($.Scratch.Get "version-class" | append "version-current" ) }} {{ end }} - {{ .version }} {{ if eq .version ( delimit $thisVersionArray "." ) }} {{ T "docs_version_current" }} {{ end }} {{ end }} {{ if ne (index ($.Scratch.Get "version-class") 0) "placeholder" }} {{ end }} {{ end }}