|
1 | 1 | {{ define "header" }}
|
2 |
| -<div class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar navbar-fixed-top"> |
3 |
| - <div class="container-fluid flex-md-row flex-column header-container"> |
4 |
| - <a class="navbar-brand mr-0 mr-md-2" href="/" aria-label="NGINX Docs"> |
5 |
| - <img class="navbar-img" src="{{ "/images/icons/NGINX-Docs-horiz-white-type.svg" | absURL }}" alt="NGINX Docs"> |
6 |
| - </a> |
| 2 | +<div class="header-container"> |
| 3 | + |
| 4 | + <div class="header__logo"> |
| 5 | + <a href="{{ .Site.BaseURL | relLangURL }}" alt="NGINX Docs Home"> |
| 6 | + <img class="header__img" src="{{ "/images/icons/NGINX-Docs-horiz-black-type.svg" | absURL }}" alt="NGINX Docs"> |
| 7 | + </a> |
| 8 | + </div> |
| 9 | + |
| 10 | + <div class="header__product-selector"> |
| 11 | + {{ $nginxProducts := slice |
| 12 | + (dict "title" "NGINX One Console" "url" "/nginx-one" "type" "nginx-one") |
| 13 | + (dict "title" "NGINX Plus" "url" "/nginx" "type" "nginx-one") |
| 14 | + (dict "title" "NGINX Instance Manager" "url" "/nginx-instance-manager" "type" "nginx-one") |
| 15 | + (dict "title" "NGINX Ingress Controller" "url" "/nginx-ingress-controller" "type" "nginx-one") |
| 16 | + (dict "title" "NGINX Gateway Fabric" "url" "/nginx-gateway-fabric" "type" "nginx-one") |
| 17 | + (dict "title" "NGINX Open Source" "url" "https://nginx.org/en/docs/" "type" "nginx-one") |
| 18 | + (dict "title" "NGINX Agent" "url" "/nginx-agent" "type" "nginx-one") |
| 19 | + (dict "title" "NGINX App Protect WAF" "url" "/nginx-app-protect-waf" "type" "nginx-app-protect") |
| 20 | + (dict "title" "NGINX App Protect DoS" "url" "/nginx-app-protect-dos" "type" "nginx-app-protect") |
| 21 | + (dict "title" "NGINX as a Service for Azure" "url" "/nginxaas/azure/" "type" "nginx-as-a-service") |
| 22 | + (dict "title" "NGINX Unit" "url" "https://unit.nginx.org/" "type" "nginx-other") |
| 23 | + }} |
| 24 | + {{ $productMap := dict }} |
| 25 | + {{ range $nginxProducts }} |
| 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 }} |
| 30 | + {{ end }} |
| 31 | + {{ $relPermalink := .RelPermalink }} |
| 32 | + {{ $productIdentifier := index ((split $relPermalink "/")) 1 }} |
| 33 | + {{ $productName := index $productMap $productIdentifier | default "Product Documentation" }} |
| 34 | + |
| 35 | + <button class="product-selector__button" id="product-selector-button"> |
| 36 | + {{/* product name and selector */}} |
| 37 | + <span class="product-name">{{ $productName }}</span> |
| 38 | + <span class="product-selector-button-icon"> |
| 39 | + <svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 40 | + <path d="M1 13L7 7L0.999999 1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> |
| 41 | + </svg> |
| 42 | + </span> |
| 43 | + </button> |
| 44 | + <div class="product-selector" id="product-selector"> |
| 45 | + {{ $groupedProducts := dict |
| 46 | + "nginx-one" (where $nginxProducts "type" "nginx-one") |
| 47 | + "nginx-app-protect" (where $nginxProducts "type" "nginx-app-protect") |
| 48 | + "nginx-as-a-service" (where $nginxProducts "type" "nginx-as-a-service") |
| 49 | + "nginx-other" (where $nginxProducts "type" "nginx-other") |
| 50 | + }} |
| 51 | + {{ $orderedKeys := slice "nginx-one" "nginx-app-protect" "nginx-as-a-service" "nginx-other" }} |
| 52 | + {{ range $orderedKeys }} |
| 53 | + {{ $type := . }} |
| 54 | + {{ $products := index $groupedProducts $type }} |
| 55 | + <div class="product-selector-content" id="product-selector-content"> |
| 56 | + <p>{{ $type | humanize | title | upper }}</p> |
| 57 | + <ul> |
| 58 | + {{ range $products }} |
| 59 | + <li> |
| 60 | + <a href="{{ .url }}">{{ .title }}</a> |
| 61 | + </li> |
| 62 | + {{ end }} |
| 63 | + </ul> |
| 64 | + </div> |
| 65 | + {{ end }} |
| 66 | + </div> |
| 67 | + |
| 68 | + |
| 69 | + </div> |
| 70 | + |
7 | 71 | {{ if ( not ( in .Site.Params.buildtype "package" ) ) }}
|
8 |
| - <div class="navbar navbar-nav"> |
| 72 | + <div class="header__search"> |
9 | 73 | <!-- Standalone search box. -->
|
10 | 74 | {{ partial "coveo-atomic-search.html" }}
|
11 | 75 | </div>
|
12 | 76 | {{ end }}
|
13 |
| - {{ if ( in .Site.Params.buildtype "package" ) }} |
14 |
| - <div class="navbar-nav-scroll" id="navbarNavScroll"> |
15 |
| - <ul class="navbar-nav flex-row"> |
16 |
| - <li class="nav-item dropdown active"> |
17 |
| - <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
18 |
| - Sections |
19 |
| - </a> |
20 |
| - {{ partial "products-menu.html" . }} |
21 |
| - </li> |
22 |
| - </ul> |
23 |
| - </div> |
24 |
| - {{ end }} |
25 |
| - |
26 |
| - {{ $f5Sites := slice |
| 77 | + |
| 78 | + <div class="header__f5sites"> |
| 79 | + {{ $f5Sites := slice |
27 | 80 | (dict "title" "DevCentral" "url" "https://community.f5.com/" "description" "Connect & learn in our hosted community")
|
28 | 81 | (dict "title" "MyF5" "url" "https://my.f5.com/" "description" "Your key to everything F5, including support, registration keys, and subscriptions")
|
29 | 82 | (dict "title" "NGINX" "url" "https://nginx.org/" "description" "Learn more about NGINX Open Source and read the community blog")
|
30 | 83 | }}
|
| 84 | + |
31 | 85 | <ul class="navbar navbar-nav">
|
32 | 86 | <li class="nav-item-explore active">
|
33 | 87 | <button id="navbar-sites-button" class="button navbar-button">
|
|
46 | 100 | </div>
|
47 | 101 | </li>
|
48 | 102 | </ul>
|
49 |
| - </div> |
50 |
| -</div> |
51 | 103 |
|
| 104 | + </div> |
| 105 | +</div> |
52 | 106 | {{ end }}
|
0 commit comments