add state to product dropdown items

pull/5760/head
Scott Anderson 2025-01-13 07:15:38 -07:00
parent d929bfcfd1
commit 8dd3b31282
2 changed files with 7 additions and 1 deletions

View File

@ -173,6 +173,11 @@
border-radius: 0 0 $radius $radius;
position: relative;
}
span.state {
font-size: .9em;
opacity: .65;
font-style: italic;
}
}
}
}

View File

@ -36,7 +36,8 @@ Identify products by their product path. Dictionary schema:
{{ $productAltLinkKey := index (index $.productInfo .productPath) 1 }}
{{ $isCurrentProduct := in $.context.RelPermalink .productPath }}
{{ $link := cond .useRootProductLink (print "/" .productPath "/") (cond (isset .altLinks $productAltLinkKey) (index .altLinks $productAltLinkKey) (cond $defaultAltProductPageExists $defaultAltProductPage.RelPermalink (print "/" .productPath "/"))) }}
<a href='{{ $link }}' {{ if $isCurrentProduct }}class="active"{{ end }}>{{ index (index $.productInfo .productPath) 0 }}</a>
{{ $isAlpha := in (slice "influxdb3/core" "influxdb3/enterprise") .productPath }}
<a href='{{ $link }}' {{ if $isCurrentProduct }}class="active"{{ end }}>{{ index (index $.productInfo .productPath) 0 }}{{ if $isAlpha }} <span class="state">alpha</span>{{ end }}</a>
{{ end }}
{{ $templateDefaults := dict "context" . "productInfo" $productInfo "altLinks" $altLinks "pageRoot" $pageRoot "useRootProductLink" $useRootProductLink }}