|
| 1 | +{{ $nginxProducts := slice |
| 2 | + (dict "title" "NGINX One Console" "url" "/nginx-one" "type" "nginx-one") |
| 3 | + (dict "title" "NGINX Plus" "url" "/nginx" "type" "nginx-one") |
| 4 | + (dict "title" "NGINX Instance Manager" "url" "/nginx-instance-manager" "type" "nginx-one") |
| 5 | + (dict "title" "NGINX Ingress Controller" "url" "/nginx-ingress-controller" "type" "nginx-one") |
| 6 | + (dict "title" "NGINX Gateway Fabric" "url" "/nginx-gateway-fabric" "type" "nginx-one") |
| 7 | + (dict "title" "NGINX Open Source" "url" "https://nginx.org/en/docs/" "type" "nginx-one") |
| 8 | + (dict "title" "NGINX Agent" "url" "/nginx-agent" "type" "nginx-one") |
| 9 | + (dict "title" "NGINX App Protect WAF" "url" "/nginx-app-protect-waf" "type" "nginx-app-protect") |
| 10 | + (dict "title" "NGINX App Protect DoS" "url" "/nginx-app-protect-dos" "type" "nginx-app-protect") |
| 11 | + (dict "title" "NGINX as a Service for Azure" "url" "/nginxaas/azure/" "type" "nginx-as-a-service") |
| 12 | + (dict "title" "NGINX Unit" "url" "https://unit.nginx.org/" "type" "nginx-other") |
| 13 | +}} |
| 14 | +{{ $productMap := dict }} |
| 15 | +{{ range $nginxProducts }} |
| 16 | + {{ $productId := index (split .url "/") 1 }} |
| 17 | + {{ $productMap = merge $productMap (dict $productId .title) }} |
| 18 | +{{ end }} |
| 19 | +{{ $relPermalink := .RelPermalink }} |
| 20 | +{{ $productIdentifier := index ((split $relPermalink "/")) 1 }} |
| 21 | +{{ $productName := index $productMap $productIdentifier }} |
1 | 22 |
|
2 | 23 | <button class="product-selector-button" id="product-selector-button">
|
3 | 24 | {{/* product name and selector */}}
|
4 |
| - <div class="product-name">NGINX Plus</div> |
| 25 | + <div class="product-name">{{ $productName }}</div> |
5 | 26 | <div class="product-selector-button-icon">
|
6 | 27 | <svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
7 | 28 | <path d="M1 13L7 7L0.999999 1" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
8 | 29 | </svg>
|
9 | 30 | </div>
|
10 | 31 | </button>
|
11 | 32 | <div class="product-selector" id="product-selector">
|
12 |
| - {{ $nginxProducts := slice |
13 |
| - (dict "title" "NGINX One Console" "url" "/nginx-one" "type" "nginx-one") |
14 |
| - (dict "title" "NGINX Plus" "url" "/nginx" "type" "nginx-one") |
15 |
| - (dict "title" "NGINX Instance Manager" "url" "/nginx-instance-manager" "type" "nginx-one") |
16 |
| - (dict "title" "NGINX Ingress Controller" "url" "/nginx-ingress-controller" "type" "nginx-one") |
17 |
| - (dict "title" "NGINX Gateway Fabric" "url" "/nginx-gateway-fabric" "type" "nginx-one") |
18 |
| - (dict "title" "NGINX Open Source" "url" "https://nginx.org/en/docs/" "type" "nginx-one") |
19 |
| - (dict "title" "NGINX Agent" "url" "/nginx-agent" "type" "nginx-one") |
20 |
| - (dict "title" "NGINX App Protect WAF" "url" "/nginx-app-protect-waf" "type" "nginx-app-protect") |
21 |
| - (dict "title" "NGINX App Protect DoS" "url" "/nginx-app-protect-dos" "type" "nginx-app-protect") |
22 |
| - (dict "title" "NGINX as a Service for Azure" "url" "/nginxaas/azure/" "type" "nginx-as-a-service") |
23 |
| - (dict "title" "NGINX Unit" "url" "https://unit.nginx.org/" "type" "nginx-other") |
24 |
| - }} |
25 | 33 | {{ $groupedProducts := dict
|
26 | 34 | "nginx-one" (where $nginxProducts "type" "nginx-one")
|
27 | 35 | "nginx-app-protect" (where $nginxProducts "type" "nginx-app-protect")
|
|
0 commit comments