fix menu items with external URLs, closes #3797

pull/3802/head^2
Scott Anderson 2022-02-22 10:00:03 -07:00
parent e026efb49a
commit fed1488e7d
56 changed files with 117 additions and 62 deletions

View File

@ -5,6 +5,7 @@ menu:
chronograf_1_6:
weight: 30
parent: About the project
params:
url: https://www.influxdata.com/legal/cla/
---

View File

@ -5,6 +5,7 @@ menu:
name: Contributing
weight: 20
parent: About the project
params:
url: https://github.com/influxdata/chronograf/blob/master/CONTRIBUTING.md
---

View File

@ -5,6 +5,7 @@ menu:
Name: Open source license
weight: 40
parent: About the project
params:
url: https://github.com/influxdata/chronograf/blob/master/LICENSE
---

View File

@ -5,6 +5,7 @@ menu:
chronograf_1_7:
weight: 30
parent: About the project
params:
url: https://www.influxdata.com/legal/cla/
---

View File

@ -5,6 +5,7 @@ menu:
name: Contribute
weight: 20
parent: About the project
params:
url: https://github.com/influxdata/chronograf/blob/master/CONTRIBUTING.md
---

View File

@ -5,6 +5,7 @@ menu:
Name: Open source license
weight: 40
parent: About the project
params:
url: https://github.com/influxdata/chronograf/blob/master/LICENSE
---

View File

@ -6,6 +6,7 @@ menu:
chronograf_1_8:
weight: 30
parent: About the project
params:
url: https://www.influxdata.com/legal/cla/
---

View File

@ -6,6 +6,7 @@ menu:
name: Contribute
weight: 20
parent: About the project
params:
url: https://github.com/influxdata/chronograf/blob/master/CONTRIBUTING.md
---

View File

@ -6,6 +6,7 @@ menu:
Name: Open source license
weight: 40
parent: About the project
params:
url: https://github.com/influxdata/chronograf/blob/master/LICENSE
---

View File

@ -6,6 +6,7 @@ menu:
chronograf_1_9:
weight: 30
parent: About the project
params:
url: https://www.influxdata.com/legal/cla/
---

View File

@ -6,6 +6,7 @@ menu:
name: Contribute
weight: 20
parent: About the project
params:
url: https://github.com/influxdata/chronograf/blob/master/CONTRIBUTING.md
---

View File

@ -6,6 +6,7 @@ menu:
Name: Open source license
weight: 40
parent: About the project
params:
url: https://github.com/influxdata/chronograf/blob/master/LICENSE
---

View File

@ -9,6 +9,7 @@ menu:
influxdb_cloud:
name: Arduino
parent: Client libraries
params:
url: https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: C#
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-csharp
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: Dart
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-dart
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: Java
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: Kotlin
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: PHP
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-php
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: R
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-r
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: Ruby
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-ruby
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: Scala
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_cloud:
name: Swift
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-swift
weight: 201
---

View File

@ -6,6 +6,7 @@ menu:
influxdb_1_3:
weight: 80
parent: Tools
params:
url: https://github.com/influxdata/influxdb/blob/master/services/collectd/README.md
---

View File

@ -6,6 +6,7 @@ menu:
influxdb_1_3:
weight: 70
parent: Tools
params:
url: https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md
---

View File

@ -6,6 +6,7 @@ menu:
influxdb_1_3:
weight: 90
parent: Tools
params:
url: https://github.com/influxdb/influxdb/blob/1.3/services/opentsdb/README.md
---

View File

@ -6,6 +6,7 @@ menu:
influxdb_1_3:
weight: 60
parent: Tools
params:
url: https://github.com/influxdata/influxdb/blob/master/services/udp/README.md
---

View File

@ -9,6 +9,7 @@ menu:
influxdb_2_0:
name: Arduino
parent: Client libraries
params:
url: https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: C#
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-csharp
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: Dart
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-dart
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: Java
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: Kotlin
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: PHP
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-php
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: R
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-r
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: Ruby
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-ruby
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: Scala
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_0:
name: Swift
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-swift
weight: 201
---

View File

@ -9,6 +9,7 @@ menu:
influxdb_2_1:
name: Arduino
parent: Client libraries
params:
url: https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: C#
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-csharp
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: Dart
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-dart
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: Java
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: Kotlin
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: PHP
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-php
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: R
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-r
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: Ruby
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-ruby
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: Scala
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala
weight: 201
---

View File

@ -8,6 +8,7 @@ menu:
influxdb_2_1:
name: Swift
parent: Client libraries
params:
url: https://github.com/influxdata/influxdb-client-swift
weight: 201
---

View File

@ -6,5 +6,6 @@ menu:
name: Contributing
weight: 20
parent: About the project
params:
url: https://github.com/influxdata/kapacitor/blob/master/CONTRIBUTING.md
---

View File

@ -7,6 +7,7 @@ menu:
name: Contributing event handler integrations
weight: 30
parent: About the project
params:
url: https://github.com/influxdata/kapacitor/blob/master/alert/HANDLERS.md
---

View File

@ -6,5 +6,6 @@ menu:
name: Open source license
weight: 50
parent: About the project
params:
url: https://github.com/influxdata/kapacitor/blob/master/LICENSE
---

View File

@ -6,5 +6,6 @@ menu:
name: Contributing
weight: 10
parent: About the project
params:
url: https://github.com/influxdata/kapacitor/blob/master/CONTRIBUTING.md
---

View File

@ -6,5 +6,6 @@ menu:
name: License
weight: 40
parent: About the project
params:
url: https://github.com/influxdata/kapacitor/blob/master/LICENSE
---

View File

@ -9,5 +9,6 @@ menu:
identifier: custom_alert
weight: 4
parent: work-w-kapacitor
params:
url: https://github.com/influxdata/kapacitor/blob/master/alert/HANDLERS.md
---

View File

@ -6,5 +6,6 @@ menu:
name: Contributing
weight: 10
parent: About the project
params:
url: https://github.com/influxdata/kapacitor/blob/master/CONTRIBUTING.md
---

View File

@ -6,5 +6,6 @@ menu:
name: License
weight: 40
parent: About the project
params:
url: https://github.com/influxdata/kapacitor/blob/master/LICENSE
---

View File

@ -9,5 +9,6 @@ menu:
identifier: custom_alert
weight: 4
parent: work-w-kapacitor
params:
url: https://github.com/influxdata/kapacitor/blob/master/alert/HANDLERS.md
---

View File

@ -4,37 +4,37 @@
{{ range $menu }}
<li class="nav-category {{ if eq $page.RelPermalink .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<a href='{{ cond (isset .Params "url") .Params.url .URL }}'>{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $page.RelPermalink .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<a href='{{ cond (isset .Params "url") .Params.url .URL }}'>{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $page.RelPermalink .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<a href='{{ cond (isset .Params "url") .Params.url .URL }}'>{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $page.RelPermalink .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<a href='{{ cond (isset .Params "url") .Params.url .URL }}'>{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $page.RelPermalink .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<a href='{{ cond (isset .Params "url") .Params.url .URL }}'>{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $page.RelPermalink .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<a href='{{ cond (isset .Params "url") .Params.url .URL }}'>{{ .Name }}</a>
<!-- Begin nested block -->
{{ if .HasChildren }}
@ -42,7 +42,7 @@
{{ range .Children }}
<li class="nav-item {{ if eq $page.RelPermalink .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($page.IsMenuCurrent .Menu .) ($page.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<a href='{{ cond (isset .Params "url") .Params.url .URL }}'>{{ .Name }}</a>
<!-- To add more nested layers, copy the nested block and paste it here -->
</li>
{{ end }}