forked from influxdata/docs-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnav-icon.html
83 lines (81 loc) · 3 KB
/
nav-icon.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{{ $navIcon := lower (.Get 0) | default "influx" }}
{{ if or (eq $navIcon "admin") (eq $navIcon "influx") }}
{{ .Scratch.Set "icon" "influx-icon" }}
{{ .Scratch.Set "title" "username (org-name)" }}
{{ .Scratch.Set "short_title" "User" }}
{{ else if or (eq $navIcon "data-explorer") (eq $navIcon "data explorer") (eq $navIcon "explore") }}
{{ .Scratch.Set "icon" "data-explorer" }}
{{ .Scratch.Set "title" "Data Explorer" }}
{{ .Scratch.Set "short_title" "Explore" }}
{{ else if or (eq $navIcon "notebooks") (eq $navIcon "books") }}
{{ .Scratch.Set "icon" "book-pencil" }}
{{ .Scratch.Set "title" "Notebooks" }}
{{ .Scratch.Set "short_title" "Books" }}
{{ else if or (eq $navIcon "dashboards") (eq $navIcon "boards") }}
{{ .Scratch.Set "icon" "dashboards" }}
{{ .Scratch.Set "title" "Dashboards" }}
{{ .Scratch.Set "short_title" "Dashboards" }}
{{ .Scratch.Set "short_title" "Boards" }}
{{ else if eq $navIcon "tasks" }}
{{ .Scratch.Set "icon" "calendar" }}
{{ .Scratch.Set "title" "Tasks" }}
{{ .Scratch.Set "short_title" "Tasks" }}
{{ else if or (eq $navIcon "monitor") (eq $navIcon "alerts") (eq $navIcon "bell") }}
{{ .Scratch.Set "icon" "bell" }}
{{ .Scratch.Set "title" "Alerts" }}
{{ .Scratch.Set "short_title" "Alerts" }}
{{ else if or (eq $navIcon "disks") (eq $navIcon "load data") (eq $navIcon "load-data") (eq $navIcon "data") }}
{{ .Scratch.Set "icon" "disks-nav" }}
{{ .Scratch.Set "title" "Load Data" }}
{{ .Scratch.Set "short_title" "Data" }}
{{ else if eq $navIcon "settings" }}
{{ .Scratch.Set "icon" "wrench-nav" }}
{{ .Scratch.Set "title" "Settings" }}
{{ .Scratch.Set "short_title" "Settings" }}
{{ else if or (eq $navIcon "org") (eq $navIcon "organization") }}
{{ .Scratch.Set "icon" "users-trio" }}
{{ .Scratch.Set "title" "Organization" }}
{{ .Scratch.Set "short_title" "Org" }}
{{ end }}
{{ if or (eq $navIcon "profile") (eq $navIcon "account") }}
<div class="nav-items">
<div class="nav-item account small">
<div class="acct-inner">
<div class="acct-icon">
<span class="icon icon-user"></span>
</div>
</div>
</div>
<div class="nav-item account">
<div class="acct-inner">
<div class="acct-icon"><span class="icon icon-user"></span></div>
<div class="acct-label">
<div class="username">username</div>
<div class="orgname">org-name</div>
</div>
</div>
</div>
</div>
{{ else }}
{{ $icon := .Scratch.Get "icon" }}
{{ $title := .Scratch.Get "title" }}
{{ $shortTitle := .Scratch.Get "short_title" }}
<div class="nav-items">
<div class="nav-item">
<div class="nav-icon small">
<span class ="icon icon-{{ $icon }}"></span>
<div class="nav-icon-label">
{{ $shortTitle }}
</div>
</div>
</div>
<div class="nav-item">
<div class="nav-icon">
<span class ="icon icon-{{ $icon }}"></span>
<div class="nav-icon-label">
{{ $title }}
</div>
</div>
</div>
</div>
{{ end }}