add state to product dropdown items
parent
d929bfcfd1
commit
8dd3b31282
|
@ -173,6 +173,11 @@
|
|||
border-radius: 0 0 $radius $radius;
|
||||
position: relative;
|
||||
}
|
||||
span.state {
|
||||
font-size: .9em;
|
||||
opacity: .65;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in New Issue