restructured top nav partials

pull/1272/head
Scott Anderson 2020-07-30 11:34:57 -06:00
parent a406d5a021
commit 78e48dec79
7 changed files with 7 additions and 20 deletions

View File

@ -1,4 +1,5 @@
{{ partial "header.html" . }}
{{ partial "topnav.html" . }}
<div class="page-wrapper">
{{ partial "sidebar.html" . }}

View File

@ -1,4 +1,5 @@
{{ partial "header.html" . }}
{{ partial "header.html" . }}\
{{ partial "topnav.html" . }}
<div class="page-wrapper">
{{ partial "sidebar.html" . }}

View File

@ -1,4 +1,5 @@
{{ partial "header.html" . }}
{{ partial "topnav.html" . }}
<div class="page-wrapper">
{{ partial "sidebar.html" . }}

View File

@ -1,4 +1,5 @@
{{ partial "header.html" . }}
{{ partial "topnav.html" . }}
<div class="page-wrapper">
{{ partial "sidebar.html" . }}

View File

@ -1,4 +1,5 @@
{{ partial "header.html" . }}
{{ partial "topnav.html" . }}
{{ $productPathData := findRE "[^/]+.*?" .RelPermalink }}
{{ $product := index $productPathData 0 }}

View File

@ -31,4 +31,3 @@
</head>
<body>
{{ partial "header/google-analytics-body.html" }}
{{ partial "topnav.html" . }}

View File

@ -1,7 +1,3 @@
{{ $productPathData := findRE "[^/]+.*?" .RelPermalink }}
{{ $product := index $productPathData 0 }}
{{ $currentVersion := index $productPathData 1 }}
<div class="topnav">
<div class="topnav--left">
<a class="influx-home" href="https://www.influxdata.com" title="InfluxData"><span class="icon-influx-logo"></span><span class="icon-influx-logotype"></span></a>
@ -9,20 +5,7 @@
<a class="docs-home" href="/{{ $.Site.Data.versions.stable_version }}">InfluxDB Docs</a>
</div>
<div class="topnav--right">
{{ if or (eq $product nil) (eq $currentVersion nil) }}
{{ else }}
<div class="version-selector">
<p class="selected">{{ $currentVersion }}</p>
<ul class="version-list">
<li><a href="https://github.com/influxdata/docs.influxdata.com" class="legacy" target="_blank">older</a></li>
{{ range (index .Site.Data.products $product).versions }}
<li>
<a href="/{{ $product }}/{{ . }}" {{ if eq . $currentVersion }}class="active"{{ end }}>{{ . }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ partial "topnav/version-selector.html" . }}
<button id="search-btn" onclick="toggle_sidebar('sidebar-open');document.getElementById('algolia-search-input').focus();return false;"><span class="icon-search"></span></button>
<button class="url-trigger" href="#"><span class="icon-ui-cog-thick"></span></button>
<button class="theme-switcher" id="theme-switch-light" onclick="switch_style('light-theme');return false;"><span class="icon-sun1"></span></button>