Skip to content

Commit 44a5a3d

Browse files
committed
Header: Added default product selector text
1 parent 417422e commit 44a5a3d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

assets/css/v2/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ ol li:last-child {
454454
display: none;
455455
width: 400px;
456456
max-width: 80vw;
457-
margin-right: 2rem;
457+
margin-right: 1rem;
458458
}
459459

460460
.dropdown-content ul {

layouts/partials/header.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
}}
2424
{{ $productMap := dict }}
2525
{{ range $nginxProducts }}
26-
{{ $productId := index (split .url "/") 1 }}
27-
{{ $productMap = merge $productMap (dict $productId .title) }}
26+
{{ if not (or (eq .title "NGINX Open Source" ) (eq .title "NGINX Unit")) }}
27+
{{ $productId := index (split .url "/") 1 }}
28+
{{ $productMap = merge $productMap (dict $productId .title) }}
29+
{{ end }}
2830
{{ end }}
2931
{{ $relPermalink := .RelPermalink }}
3032
{{ $productIdentifier := index ((split $relPermalink "/")) 1 }}
31-
{{ $productName := index $productMap $productIdentifier }}
33+
{{ $productName := index $productMap $productIdentifier | default "Product Documentation" }}
3234

3335
<button class="product-selector__button" id="product-selector-button">
3436
{{/* product name and selector */}}

0 commit comments

Comments
 (0)