{{ $navIcon := lower (.Get 0) | default "influx" }} {{- $productPathData := findRE "[^/]+.*?" .Page.RelPermalink -}} {{- $product := index $productPathData 0 -}} {{- $productVersion := index $productPathData 1 | default "v0.0" -}} {{- $defaultClockface := cond (isset (index .Site.Data.clockface $product) $productVersion) (index (index .Site.Data.clockface $product) $productVersion) (index (index .Site.Data.clockface $product) "default") }} {{- $version := .Get 1 | default $defaultClockface -}} {{ if eq $version "v2" }} {{ 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" "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") }} {{ else }} {{ $icon := .Scratch.Get "icon" }} {{ $title := .Scratch.Get "title" }} {{ $shortTitle := .Scratch.Get "short_title" }} {{ end }} {{ else }} {{ if eq $version "v3" }} {{/* ----------------------- CLOCKFACE v3 ----------------------- */}} {{ if or (eq $navIcon "data-explorer") (eq $navIcon "data explorer") (eq $navIcon "explore") }} {{ .Scratch.Set "icon" "graphline-2" }} {{ .Scratch.Set "title" "Data Explorer" }} {{ else if or (eq $navIcon "notebooks") (eq $navIcon "books") }} {{ .Scratch.Set "icon" "book-pencil" }} {{ .Scratch.Set "title" "Notebooks" }} {{ else if or (eq $navIcon "dashboards") (eq $navIcon "boards") }} {{ .Scratch.Set "icon" "graph-line-new" }} {{ .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" "Alerts" }} {{ else if or (eq $navIcon "load data") (eq $navIcon "load-data") (eq $navIcon "data") }} {{ .Scratch.Set "icon" "ingest-new" }} {{ .Scratch.Set "title" "Load Data" }} {{ else if eq $navIcon "settings" }} {{ .Scratch.Set "icon" "wrench-nav" }} {{ .Scratch.Set "title" "Settings" }} {{ end }} {{ else }} {{/* ----------------------- CLOCKFACE v4 ----------------------- */}} {{ if or (eq $navIcon "data-explorer") (eq $navIcon "data explorer") (eq $navIcon "explore") }} {{ .Scratch.Set "icon" "GraphLine_New" }} {{ .Scratch.Set "title" "Data Explorer" }} {{ else if or (eq $navIcon "notebooks") (eq $navIcon "books") }} {{ .Scratch.Set "icon" "Pencil" }} {{ .Scratch.Set "title" "Notebooks" }} {{ else if or (eq $navIcon "dashboards") (eq $navIcon "boards") }} {{ .Scratch.Set "icon" "DashH" }} {{ .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" "Alerts" }} {{ else if or (eq $navIcon "load data") (eq $navIcon "load-data") (eq $navIcon "data") }} {{ .Scratch.Set "icon" "Upload_New" }} {{ .Scratch.Set "title" "Load Data" }} {{ else if eq $navIcon "settings" }} {{ .Scratch.Set "icon" "CogOutline_New" }} {{ .Scratch.Set "title" "Settings" }} {{ end }} {{ end }} {{ if or (eq $navIcon "profile") (eq $navIcon "account") }} {{ else }} {{ $icon := .Scratch.Get "icon" }} {{ $title := .Scratch.Get "title" }} {{ end }} {{ end }}