docs-v2/layouts/shortcodes/icon.html

264 lines
16 KiB
HTML

{{- $_hugo_config := `{ "version": 1 }` -}}
{{- $icon := .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 $icon "nav-admin") (eq $icon "influx") (eq $icon "influx-icon") -}}
<span class="inline icon-influx-icon middle"></span>
{{- else if or (eq $icon "nav-data-explorer") (eq $icon "data-explorer") (eq $icon "graph") -}}
<span class="inline icon-data-explorer middle large"></span>
{{- else if or (eq $icon "nav-dashboards") (eq $icon "dashboard") (eq $icon "dashboards") -}}
<span class="inline icon-dashboards middle"></span>
{{- else if or (eq $icon "nav-tasks") (eq $icon "calendar") (eq $icon "tasks") -}}
<span class="inline icon-calendar"></span>
{{- else if or (eq $icon "nav-organizations") (eq $icon "nav-orgs") (eq $icon "orgs") (eq $icon "org") -}}
<span class="inline icon-organizations middle"></span>
{{- else if or (eq $icon "nav-configuration") (eq $icon "nav-config") (eq $icon "wrench") -}}
<span class="inline icon-wrench-2 middle large"></span>
{{- else if eq $icon "add-cell" -}}
<span class="inline icon-add-cell small"></span>
{{- else if eq $icon "alert" -}}
<span class="inline icon-alert middle"></span>
{{- else if or (eq $icon "checkmark") (eq $icon "check") -}}
<span class="inline icon-checkmark middle"></span>
{{- else if or (eq $icon "gear") (eq $icon "cog") (eq $icon "settings") (eq $icon "config") -}}
<span class="inline icon-cog-thick middle small"></span>
{{- else if eq $icon "download" -}}
<span class="inline icon-download middle"></span>
{{- else if or (eq $icon "duplicate") (eq $icon "copy") (eq $icon "clone") -}}
<span class="inline icon-duplicate middle small"></span>
{{- else if or (eq $icon "export") (eq $icon "save-as") -}}
<span class="inline icon-export middle small"></span>
{{- else if or (eq $icon "expand") (eq $icon "fullscreen") -}}
<span class="inline icon-fullscreen middle large"></span>
{{- else if eq $icon "note" -}}
<span class="inline icon-note middle small"></span>
{{- else if eq $icon "pause" -}}
<span class="inline icon-pause middle"></span>
{{- else if or (eq $icon "pencil") (eq $icon "edit") -}}
<span class="inline icon-pencil middle small"></span>
{{- else if eq $icon "play" -}}
<span class="inline icon-play middle small"></span>
{{- else if eq $icon "plus" -}}
<span class="inline icon-ui-plus middle xsmall"></span>
{{- else if or (eq $icon "refresh") (eq $icon "replay") -}}
<span class="inline icon-refresh middle small"></span>
{{- else if or (eq $icon "remove") (eq $icon "x") -}}
<span class="inline icon-remove top small"></span>
{{- else if eq $icon "search" -}}
<span class="inline icon-search middle small"></span>
{{- else if or (eq $icon "trash") (eq $icon "trashcan") (eq $icon "delete") -}}
<span class="inline icon-trash top small"></span>
{{- else if eq $icon "triangle" -}}
<span class="inline icon-triangle middle"></span>
{{- else if eq $icon "cloud" -}}
<span class="inline icon-cloud large"></span>
{{- else if eq $icon "feedback" -}}
<span class="inline icon-nav-chat large"></span>
{{- else if eq $icon "chat" -}}
<span class="inline icon-chat large"></span>
{{- else if or (eq $icon "eye-open") (eq $icon "eye") (eq $icon "view") -}}
<span class="inline icon-eye-open large"></span>
{{- else if or (eq $icon "eye-closed") (eq $icon "hide") -}}
<span class="inline icon-eye-closed large"></span>
{{- else if or (eq $icon "notebook") (eq $icon "notebooks") -}}
<span class="inline icon-book-pencil"></span>
{{- else if eq $icon "crown" -}}
<span class="inline icon-crown large"></span>
{{- else if or (eq $icon "bar-chart") (eq $icon "bar-graph") -}}
<span class="inline icon-bar-chart top small"></span>
{{- else if eq $icon "add-label" -}}
<span class="inline add-btn-round">&#xe931;</span>
{{- else if or (eq $icon "toggle") (eq $icon "toggle-blue") -}}
<span class="inline ui-toggle blue"><span class="circle"></span></span>
{{- else if eq $icon "toggle-green" -}}
<span class="inline ui-toggle green"><span class="circle"></span></span>
{{- end -}}
{{- else if eq $version "v3" -}}
{{- if or (eq $icon "nav-admin") (eq $icon "influx") (eq $icon "influx-icon") -}}
<span class="inline {{ $version }} cf-icon cubo middle"></span>
{{- else if or (eq $icon "nav-data-explorer") (eq $icon "data-explorer") (eq $icon "graph") -}}
<span class="inline {{ $version }} cf-icon graphline-2 middle large"></span>
{{- else if or (eq $icon "nav-dashboards") (eq $icon "dashboard") (eq $icon "dashboards") -}}
<span class="inline {{ $version }} cf-icon graph-line-new"></span>
{{- else if or (eq $icon "nav-tasks") (eq $icon "calendar") (eq $icon "tasks") -}}
<span class="inline {{ $version }} cf-icon calendar"></span>
{{- else if or (eq $icon "nav-organizations") (eq $icon "nav-orgs") (eq $icon "orgs") (eq $icon "org") -}}
<span class="inline {{ $version }} cf-icon users-duo middle"></span>
{{- else if or (eq $icon "nav-configuration") (eq $icon "nav-config") (eq $icon "wrench") -}}
<span class="inline {{ $version }} cf-icon wrench-nav middle large"></span>
{{- else if eq $icon "add-cell" -}}
<span class="inline {{ $version }} cf-icon add-cell-new small"></span>
{{- else if eq $icon "alert" -}}
<span class="inline {{ $version }} cf-icon alert-triangle-new middle"></span>
{{- else if or (eq $icon "checkmark") (eq $icon "check") -}}
<span class="inline {{ $version }} cf-icon checkmark-new large"></span>
{{- else if or (eq $icon "gear") (eq $icon "cog") (eq $icon "settings") (eq $icon "config") -}}
<span class="inline {{ $version }} cf-icon cog-solid-new middle small"></span>
{{- else if eq $icon "download" -}}
<span class="inline {{ $version }} cf-icon download-new middle large"></span>
{{- else if or (eq $icon "duplicate") (eq $icon "copy") (eq $icon "clone") -}}
<span class="inline {{ $version }} cf-icon duplicate middle small"></span>
{{- else if or (eq $icon "export") (eq $icon "save-as") -}}
<span class="inline {{ $version }} cf-icon export-new middle"></span>
{{- else if or (eq $icon "expand") (eq $icon "fullscreen") -}}
<span class="inline {{ $version }} cf-icon expand-b middle"></span>
{{- else if eq $icon "note" -}}
<span class="inline {{ $version }} cf-icon text-new middle"></span>
{{- else if eq $icon "pause" -}}
<span class="inline {{ $version }} cf-icon pause middle"></span>
{{- else if or (eq $icon "pencil") (eq $icon "edit") -}}
<span class="inline {{ $version }} cf-icon pencil"></span>
{{- else if eq $icon "play" -}}
<span class="inline {{ $version }} cf-icon play middle small"></span>
{{- else if eq $icon "plus" -}}
<span class="inline {{ $version }} cf-icon plus-new top"></span>
{{- else if or (eq $icon "refresh") (eq $icon "replay") -}}
<span class="inline {{ $version }} cf-icon refresh-new middle"></span>
{{- else if or (eq $icon "remove") (eq $icon "x") -}}
<span class="inline {{ $version }} cf-icon remove-new large"></span>
{{- else if eq $icon "search" -}}
<span class="inline {{ $version }} cf-icon search middle small"></span>
{{- else if or (eq $icon "trash") (eq $icon "trashcan") (eq $icon "delete") -}}
<span class="inline {{ $version }} cf-icon trash-new top small"></span>
{{- else if eq $icon "triangle" -}}
<span class="inline {{ $version }} cf-icon triangle middle"></span>
{{- else if eq $icon "cloud" -}}
<span class="inline icon-cloud large"></span>
{{- else if eq $icon "feedback" -}}
<span class="inline icon-nav-chat large"></span>
{{- else if eq $icon "chat" -}}
<span class="inline icon-chat large"></span>
{{- else if or (eq $icon "eye-open") (eq $icon "eye") (eq $icon "view") -}}
<span class="inline {{ $version }} cf-icon eye-open-new"></span>
{{- else if or (eq $icon "eye-closed") (eq $icon "hide") -}}
<span class="inline {{ $version }} cf-icon eye-closed large"></span>
{{- else if or (eq $icon "notebook") (eq $icon "notebooks") -}}
<span class="inline {{ $version }} cf-icon book-pencil"></span>
{{- else if eq $icon "crown" -}}
<span class="inline {{ $version }} cf-icon crown-solid-new "></span>
{{- else if or (eq $icon "bar-chart") (eq $icon "bar-graph") -}}
<span class="inline {{ $version }} cf-icon bar-chart-new top"></span>
{{- else if eq $icon "add-label" -}}
<span class="inline add-btn-round {{ $version }}">&#xe931;</span>
{{- else if or (eq $icon "toggle") (eq $icon "toggle-blue") -}}
<span class="inline ui-toggle blue {{ $version }}"><span class="circle"></span></span>
{{- else if eq $icon "toggle-green" -}}
<span class="inline ui-toggle green {{ $version }}"><span class="circle"></span></span>
{{- else if eq $icon "toggle-off" -}}
<span class="inline ui-toggle off {{ $version }}"><span class="circle"></span></span>
{{- else if or (eq $icon "notebook-add") (eq $icon "notebook-add-cell") -}}
<span class="inline notebook-add-cell {{ $version }}"><span class="cf-icon plus-new"></span></span>
{{- else if or (eq $icon "annotate") (eq $icon "pin") -}}
<span class="inline {{ $version }} cf-icon annotate-new"></span>
{{- else if eq $icon "clock" -}}
<span class="inline {{ $version }} cf-icon clock-new top small"></span>
{{- else if or (eq $icon "handle") (eq $icon "move-cell") (eq $icon "move") -}}
<span class="inline {{ $version }} cf-icon handle-new middle xsmall"></span>
{{- else if eq $icon "share" -}}
<span class="inline {{ $version }} cf-icon share middle"></span>
{{- else if eq $icon "bucket" -}}
<span class="inline {{ $version }} cf-icon bucket-solid top"></span>
{{- else if or (eq $icon "more") (eq $icon "...") (eq $icon "ellipses") -}}
<span class="inline {{ $version }} cf-icon more bottom"></span>
{{- end -}}
{{- else -}}
{{- if or (eq $icon "nav-admin") (eq $icon "influx") (eq $icon "influx-icon") -}}
<span class="inline {{ $version }} cf-icon CuboSolid middle"></span>
{{- else if or (eq $icon "nav-data-explorer") (eq $icon "data-explorer") (eq $icon "graph") -}}
<span class="inline {{ $version }} cf-icon GraphLine_New middle large"></span>
{{- else if or (eq $icon "nav-dashboards") (eq $icon "dashboard") (eq $icon "dashboards") -}}
<span class="inline {{ $version }} cf-icon DashH"></span>
{{- else if or (eq $icon "nav-tasks") (eq $icon "calendar") (eq $icon "tasks") -}}
<span class="inline {{ $version }} cf-icon Calendar"></span>
{{- else if or (eq $icon "nav-organizations") (eq $icon "nav-orgs") (eq $icon "orgs") (eq $icon "org") -}}
<span class="inline {{ $version }} cf-icon User middle"></span>
{{- else if eq $icon "add-cell" -}}
<span class="inline {{ $version }} cf-icon AddCell_New small"></span>
{{- else if eq $icon "alert" -}}
<span class="inline {{ $version }} cf-icon AlertTriangle middle"></span>
{{- else if or (eq $icon "checkmark") (eq $icon "check") -}}
<span class="inline {{ $version }} cf-icon Checkmark_New large"></span>
{{- else if or (eq $icon "gear") (eq $icon "cog") (eq $icon "settings") (eq $icon "config") -}}
<span class="inline {{ $version }} cf-icon CogSolid_New middle small"></span>
{{- else if eq $icon "download" -}}
<span class="inline {{ $version }} cf-icon Download_New middle large"></span>
{{- else if or (eq $icon "duplicate") (eq $icon "copy") (eq $icon "clone") -}}
<span class="inline {{ $version }} cf-icon Duplicate_New middle small"></span>
{{- else if or (eq $icon "export") (eq $icon "save-as") -}}
<span class="inline {{ $version }} cf-icon Export_New middle"></span>
{{- else if or (eq $icon "expand") (eq $icon "fullscreen") -}}
<span class="inline {{ $version }} cf-icon ExpandB middle"></span>
{{- else if eq $icon "note" -}}
<span class="inline {{ $version }} cf-icon Text_New middle"></span>
{{- else if eq $icon "pause" -}}
<span class="inline {{ $version }} cf-icon Pause middle"></span>
{{- else if or (eq $icon "pencil") (eq $icon "edit") -}}
<span class="inline {{ $version }} cf-icon Pencil"></span>
{{- else if eq $icon "play" -}}
<span class="inline {{ $version }} cf-icon Play middle small"></span>
{{- else if eq $icon "plus" -}}
<span class="inline {{ $version }} cf-icon Plus_New top"></span>
{{- else if or (eq $icon "refresh") (eq $icon "replay") -}}
<span class="inline {{ $version }} cf-icon Refresh_New middle"></span>
{{- else if or (eq $icon "remove") (eq $icon "x") -}}
<span class="inline {{ $version }} cf-icon Remove_New large"></span>
{{- else if eq $icon "search" -}}
<span class="inline {{ $version }} cf-icon Search_New middle small"></span>
{{- else if or (eq $icon "trash") (eq $icon "trashcan") (eq $icon "delete") -}}
<span class="inline {{ $version }} cf-icon Trash_New small"></span>
{{- else if eq $icon "cloud" -}}
<span class="inline cf-icon Cloud large"></span>
{{- else if eq $icon "feedback" -}}
<span class="inline df-icon Chat large"></span>
{{- else if eq $icon "chat" -}}
<span class="inline cf-icon Chat large"></span>
{{- else if or (eq $icon "eye-open") (eq $icon "eye") (eq $icon "view") -}}
<span class="inline {{ $version }} cf-icon EyeOpen"></span>
{{- else if or (eq $icon "eye-closed") (eq $icon "hide") -}}
<span class="inline {{ $version }} cf-icon EyeClosed large"></span>
{{- else if or (eq $icon "notebook") (eq $icon "notebooks") -}}
<span class="inline {{ $version }} cf-icon BookCode"></span>
{{- else if eq $icon "crown" -}}
<span class="inline {{ $version }} cf-icon CrownSolid_New "></span>
{{- else if or (eq $icon "bar-chart") (eq $icon "bar-graph") -}}
<span class="inline {{ $version }} cf-icon BarChart_New top"></span>
{{- else if eq $icon "add-label" -}}
<span class="inline add-btn-round {{ $version }}">&#xe931;</span>
{{- else if or (eq $icon "toggle") (eq $icon "toggle-blue") -}}
<span class="inline ui-toggle blue {{ $version }}"><span class="circle"></span></span>
{{- else if eq $icon "toggle-green" -}}
<span class="inline ui-toggle green {{ $version }}"><span class="circle"></span></span>
{{- else if eq $icon "toggle-off" -}}
<span class="inline ui-toggle off {{ $version }}"><span class="circle"></span></span>
{{- else if or (eq $icon "notebook-add") (eq $icon "notebook-add-cell") -}}
<span class="inline notebook-add-cell {{ $version }}"><span class="{{ $version }} cf-icon Plus_New"></span></span>
{{- else if or (eq $icon "annotate") (eq $icon "pin") -}}
<span class="inline {{ $version }} cf-icon Annotate_New"></span>
{{- else if eq $icon "clock" -}}
<span class="inline {{ $version }} cf-icon Clock_New small"></span>
{{- else if or (eq $icon "handle") (eq $icon "move-cell") (eq $icon "move") -}}
<span class="inline v3 cf-icon handle-new middle xsmall"></span>
{{- else if eq $icon "share" -}}
<span class="inline {{ $version }} cf-icon Share middle"></span>
{{- else if eq $icon "bucket" -}}
<span class="inline {{ $version }} cf-icon BucketSolid top"></span>
{{- else if or (eq $icon "more") (eq $icon "...") (eq $icon "ellipses") -}}
<span class="inline {{ $version }} cf-icon More bottom"></span>
{{- else if or (eq $icon "members") (eq $icon "group") -}}
<span class="inline {{ $version }} cf-icon Group"></span>
{{- else if or (eq $icon "billing") (eq $icon "bill") -}}
<span class="inline {{ $version }} cf-icon Bill"></span>
{{- else if or (eq $icon "flask") (eq $icon "beaker") (eq $icon "experimental") -}}
<span class="inline {{ $version }} cf-icon Flask middle"></span>
{{- else if or (eq $icon "link") (eq $icon "chain") -}}
<span class="inline {{ $version }} cf-icon Link"></span>
{{- else if or (eq $icon "question-mark") (eq $icon "question") (eq $icon "?") -}}
<span class="inline {{ $version }} cf-icon QuestionMark_Outline middle"></span>
{{- end -}}
{{- end -}}