build version list from a static list in products.yml

pull/1272/head
Scott Anderson 2020-07-29 23:07:09 -06:00
parent 79ac675d4a
commit c110a902e5
3 changed files with 17 additions and 9 deletions

View File

@ -74,6 +74,8 @@
padding: 0;
margin: 0;
list-style: none;
display: flex;
flex-direction: column-reverse;
}
a {
display: block;
@ -81,9 +83,8 @@
color: $g20-white;
padding: .5rem 1.5rem .5rem .75rem;
background: rgba($g20-white, 0);
&:hover {
background: rgba($g20-white, .2)
}
&:hover { background: rgba($g20-white, .2) }
&.active { background: rgba($g20-white, .2) }
&:last-child {
border-radius: 0 0 $radius $radius;
position: relative;

View File

@ -1,5 +1,7 @@
influxdb:
name: InfluxDB
versions: [v1.3, v1.4, v1.5, v1.6, v1.7, v1.8, v2.0]
stable: v2.0
cloud:
name: "InfluxDB Cloud 2.0"
shortname: "InfluxDB Cloud"
@ -7,15 +9,20 @@ influxdb:
telegraf:
name: Telegraf
versions: [v1.9, v1.10, v1.11, v1.12, v1.13, v1.14, v1.15]
stable: v1.15
chronograf:
name: Chronograf
versions: [v1.6, v1.7, v1.8]
stable: v1.8
kapacitor:
name: Kapacitor
versions: [v1.4, v1.5]
stable: v1.5
enterprise_influxdb:
name: "InfluxDB Enterprise"
enterprise_kapacitor:
name: "Kapacitor Enterprise"
versions: [v1.3, v1.4, v1.5, v1.6, v1.7, v1.8]
stable: v1.8

View File

@ -14,12 +14,12 @@
<div class="version-selector">
<p class="selected">{{ $currentVersion }}</p>
<ul class="version-list">
{{ range (index .Site.Menus $product).ByName.Reverse }}
<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="{{ .URL }}">{{ .Name }}</a>
<a href="/{{ $product }}/{{ . }}" {{ if eq . $currentVersion }}class="active"{{ end }}>{{ . }}</a>
</li>
{{ end }}
<li><a href="https://github.com/influxdata/docs.influxdata.com" class="legacy" target="_blank">v0.x</a></li>
</ul>
</div>
{{ end }}