added influxcloud menu to left nav, added conditional cloud page title

pull/96/head
Scott Anderson 2019-03-13 17:09:53 -05:00
parent 6c43a91e5b
commit 9ba4dbb8dc
5 changed files with 102 additions and 2 deletions

View File

@ -0,0 +1,12 @@
---
title: Get started with InfluxCloud 2.0 Beta
description: >
Setup an InfluxDB instance on InfluxCloud and use Telegraf to write data from
a remote endpoint into a bucket.
weight: 1
menu:
v2_0_cloud:
name: Get started with InfluxCloud
---
_This is just placeholder content_

View File

@ -4,4 +4,5 @@ enterprise:
cloud:
name: "InfluxCloud 2.0 Beta"
shortname: "InfluxCloud"
link: "https://www.influxdata.com/influxcloud2beta/"

View File

@ -5,10 +5,14 @@
{{ partial "header/google-analytics.html" }}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
{{ if in .RelPermalink "/cloud/"}}
<title>{{ if .Params.seotitle }} {{ print .Params.seotitle " | " }} {{ else if .Title }} {{ print .Title " | " }}{{ end }}{{ .Site.Data.products.cloud.name }} Documentation</title>
{{ else }}
<title>{{ if .Params.seotitle }} {{ print .Params.seotitle " | " }} {{ else if .Title }} {{ print .Title " | " }} {{ end }}InfluxDB {{ if $currentVersion }}{{print $currentVersion " " }}{{ end }}Documentation</title>
{{ end }}
<meta name="description" content="{{ if .Description }}{{ .Description | markdownify | plainify }}{{else}}{{ .Summary | markdownify | plainify }}{{ end }}">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="/img/favicon.png" type="image/png">
<title>{{ if .Params.seotitle }} {{ print .Params.seotitle " | " }} {{ else if .Title }} {{ print .Title " | " }} {{ end }}InfluxDB {{ if $currentVersion }}{{print $currentVersion " " }}{{ end }}Documentation</title>
{{ partial "header/canonical.html" . }}
{{ partial "header/stylesheets.html" }}

View File

@ -99,6 +99,83 @@
</li>
{{end}}
<!-- Cloud Section -->
{{ $refMenuID := print (replaceRE "[.]" "_" $currentVersion) "_cloud" }}
<h4 class="reference">{{ .Site.Data.products.cloud.shortname }}</h4>
{{ range (index .Site.Menus $refMenuID) }}
<!-- Nested Reference Navigation -->
<li class="nav-category {{ if eq $currentPage.URL .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $currentPage.URL .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $currentPage.URL .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $currentPage.URL .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $currentPage.URL .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="children {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $currentPage.URL .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<!-- Begin nested block -->
{{ if .HasChildren }}
<ul class="children {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}">
{{ range .Children }}
<li class="nav-item {{ if eq $currentPage.URL .URL }}active{{end}}">
{{ if .HasChildren }}<a href="#" class="children-toggle {{ if or ($currentPage.IsMenuCurrent .Menu .) ($currentPage.HasMenuCurrent .Menu .) }}open{{end}}"></a>{{ end }}
<a href="{{ .URL }}">{{ .Name }}</a>
<!-- To add more nested layers, copy the nested block and paste it here -->
</li>
{{ end }}
</ul>
{{ end }}
<!-- End nested block -->
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{end}}
<!-- Reference Section -->
{{ $refMenuID := print (replaceRE "[.]" "_" $currentVersion) "_ref" }}
<h4 class="reference">Reference</h4>

View File

@ -1 +1,7 @@
{{ .Site.Data.products.cloud.name }}
{{ $length := .Get 0 | default "long" }}
{{ if eq $length "long" }}
{{ .Site.Data.products.cloud.name }}
{{ else if eq $length "short" }}
{{ .Site.Data.products.cloud.shortname }}
{{ end }}