docs-v2/layouts/shortcodes/nav-icon.html

34 lines
1.3 KiB
HTML
Raw Normal View History

{{ $navIcon := lower (.Get 0) | default "influx" }}
{{ if or (eq $navIcon "admin") (eq $navIcon "influx") }}
2019-02-28 22:30:28 +00:00
{{ .Scratch.Set "icon" "influx-icon" }}
{{ .Scratch.Set "title" "username (org-name)" }}
2019-02-28 22:30:28 +00:00
{{ else if or (eq $navIcon "data-explorer") (eq $navIcon "data explorer") }}
{{ .Scratch.Set "icon" "data-explorer" }}
{{ .Scratch.Set "title" "Data Explorer" }}
{{ else if eq $navIcon "dashboards" }}
{{ .Scratch.Set "icon" "dashboards" }}
{{ .Scratch.Set "title" "Dashboards" }}
{{ else if eq $navIcon "tasks" }}
{{ .Scratch.Set "icon" "calendar" }}
{{ .Scratch.Set "title" "Tasks" }}
{{ else if or (eq $navIcon "monitor") (eq $navIcon "alerts") (eq $navIcon "bell") }}
{{ .Scratch.Set "icon" "bell" }}
{{ .Scratch.Set "title" "Monitoring & Alerting" }}
{{ else if or (eq $navIcon "disks") (eq $navIcon "load data") (eq $navIcon "load-data") }}
2019-09-10 02:04:33 +00:00
{{ .Scratch.Set "icon" "disks-nav" }}
{{ .Scratch.Set "title" "Load Data" }}
{{ else if eq $navIcon "settings" }}
2019-09-10 02:04:33 +00:00
{{ .Scratch.Set "icon" "wrench-nav" }}
{{ .Scratch.Set "title" "Settings" }}
{{ else if or (eq $navIcon "feedback") }}
{{ .Scratch.Set "icon" "nav-chat" }}
{{ .Scratch.Set "title" "Feedback" }}
2019-02-28 22:30:28 +00:00
{{ end }}
{{ $icon := .Scratch.Get "icon" }}
{{ $title := .Scratch.Get "title" }}
<div class="nav-icon">
<strong><span class ="icon icon-ui-{{ $icon }}"></span> {{ $title }}</strong>
</div>