summaryrefslogtreecommitdiffhomepage
path: root/themes/docsy/layouts/partials/navbar.html
diff options
context:
space:
mode:
authorIan Lewis <ianmlewis@gmail.com>2019-10-18 00:19:24 -0400
committerIan Lewis <ianlewis@google.com>2019-11-13 13:03:16 -0800
commita2b055de52cb90180ad57c26119fe72e61d70494 (patch)
treea156c39ba5e044fa42600a6c2d7ddd7dd91c350c /themes/docsy/layouts/partials/navbar.html
parentcf5b8ec088eac99ede97a6c9e381485695638dee (diff)
Updated to Docsy HEAD
This updates the vendored docsy to https://github.com/google/docsy/tree/1a09abe6d7eaf02e44f79de3eadf8178a3792e81
Diffstat (limited to 'themes/docsy/layouts/partials/navbar.html')
-rw-r--r--themes/docsy/layouts/partials/navbar.html13
1 files changed, 10 insertions, 3 deletions
diff --git a/themes/docsy/layouts/partials/navbar.html b/themes/docsy/layouts/partials/navbar.html
index 5ed33d097..284283b3c 100644
--- a/themes/docsy/layouts/partials/navbar.html
+++ b/themes/docsy/layouts/partials/navbar.html
@@ -1,7 +1,7 @@
{{ $cover := .HasShortcode "blocks/cover" }}
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark {{ if $cover}} td-navbar-cover {{ end }}flex-column flex-md-row td-navbar">
- <a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
- <span class="navbar-logo">{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }} {{ end }}</span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
+ <a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
+ <span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}{{ end }}</span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">
@@ -12,7 +12,14 @@
{{ with .Page }}
{{ $active = or $active ( $.IsDescendant .) }}
{{ end }}
- <a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
+ {{ $url := urls.Parse .URL }}
+ {{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
+ <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 }}><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
+ </li>
+ {{ end }}
+ {{ if .Site.Params.versions }}
+ <li class="nav-item dropdown d-none d-lg-block">
+ {{ partial "navbar-version-selector.html" . }}
</li>
{{ end }}
{{ if (gt (len .Site.Home.Translations) 0) }}