| 1 |
<!-- |
| 2 |
|
| 3 |
Licensed to the Apache Software Foundation (ASF) under one |
| 4 |
or more contributor license agreements. See the NOTICE file |
| 5 |
distributed with this work for additional information |
| 6 |
regarding copyright ownership. The ASF licenses this file |
| 7 |
to you under the Apache License, Version 2.0 (the |
| 8 |
"License"); you may not use this file except in compliance |
| 9 |
with the License. You may obtain a copy of the License at |
| 10 |
|
| 11 |
https://www.apache.org/licenses/LICENSE-2.0 |
| 12 |
|
| 13 |
Unless required by applicable law or agreed to in writing, |
| 14 |
software distributed under the License is distributed on an |
| 15 |
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 |
KIND, either express or implied. See the License for the |
| 17 |
specific language governing permissions and limitations |
| 18 |
under the License. |
| 19 |
|
| 20 |
--> |
| 21 |
|
| 22 |
{{ $cover := and (.HasShortcode "blocks/cover") (not .Site.Params.ui.navbar_translucent_over_cover_disable) }} |
| 23 |
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark {{ if $cover}} td-navbar-cover {{ end }}flex-column flex-md-row td-navbar"> |
| 24 |
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}"> |
| 25 |
{{/* AVRO-3555: Don't inline the existing logo for now. |
| 26 |
<span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}{{ with resources.Get "images/logo.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}{{ end }}</span><span class="font-weight-bold">{{ .Site.Title }}</span> |
| 27 |
*/}} |
| 28 |
<span class="navbar-logo"><img src="{{ with resources.Get "images/logo.svg" }}{{ .RelPermalink }}{{ end }}" width="35" height="30" style="margin: 0 10px"></span><span class="font-weight-bold">{{ .Site.Title }}</span> |
| 29 |
</a> |
| 30 |
|
| 31 |
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar"> |
| 32 |
<ul class="navbar-nav mt-2 mt-lg-0"> |
| 33 |
{{ $p := . }} |
| 34 |
{{ range .Site.Menus.main }} |
| 35 |
<li class="nav-item mr-4 mb-2 mb-lg-0"> |
| 36 |
{{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) }} |
| 37 |
{{ with .Page }} |
| 38 |
{{ $active = or $active ( $.IsDescendant .) }} |
| 39 |
{{ end }} |
| 40 |
{{ $pre := .Pre }} |
| 41 |
{{ $post := .Post }} |
| 42 |
{{ $url := urls.Parse .URL }} |
| 43 |
{{ $baseurl := urls.Parse $.Site.Params.Baseurl }} |
| 44 |
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }} class="active"{{end}}>{{ .Name }}</span>{{ with .Post}}{{ $post }}{{ end }}</a> |
| 45 |
</li> |
| 46 |
{{ end }} |
| 47 |
<li class="nav-item dropdown mr-4 d-none d-lg-block"> |
| 48 |
{{ partial "navbar-docs-selector.html" . }} |
| 49 |
</li> |
| 50 |
<li class="nav-item dropdown mr-4 d-none d-lg-block"> |
| 51 |
{{ partial "navbar-asf-links.html" . }} |
| 52 |
</li> |
| 53 |
{{ if (gt (len .Site.Home.Translations) 0) }} |
| 54 |
{{ end }} |
| 55 |
</ul> |
| 56 |
</div> |
| 57 |
<div class="navbar-nav d-none d-lg-block">{{ partial "search-input.html" . }}</div> |
| 58 |
</nav> |