From b0ebe86ed7f7c3ba0cf513708597fc753372cfcd Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 8 Apr 2020 13:04:45 -0600 Subject: [PATCH] WIP new nav icon styles --- assets/styles/layouts/_inline-icons.scss | 93 +++++++++++++++++++---- assets/styles/tools/_icomoon.scss | 27 ++++--- layouts/shortcodes/nav-icon.html | 33 ++++++-- static/fonts/icomoon.eot | Bin 17144 -> 17844 bytes static/fonts/icomoon.svg | 2 + static/fonts/icomoon.ttf | Bin 16980 -> 17680 bytes static/fonts/icomoon.woff | Bin 17056 -> 17756 bytes 7 files changed, 126 insertions(+), 29 deletions(-) mode change 100755 => 100644 static/fonts/icomoon.eot mode change 100755 => 100644 static/fonts/icomoon.svg mode change 100755 => 100644 static/fonts/icomoon.ttf mode change 100755 => 100644 static/fonts/icomoon.woff diff --git a/assets/styles/layouts/_inline-icons.scss b/assets/styles/layouts/_inline-icons.scss index c1ec8efb5..b69275408 100644 --- a/assets/styles/layouts/_inline-icons.scss +++ b/assets/styles/layouts/_inline-icons.scss @@ -48,24 +48,91 @@ } } - .nav-icon { - background: linear-gradient(to right, #00A3FF, #BE2EE4); - font-family: $rubik; + .nav-item { display: inline-block; - padding: 1rem 1.1rem; - border-radius: 0 5px 5px 0; - font-size: 1.05rem; - margin-bottom: 1rem; + position: relative; + vertical-align: top; + margin-bottom: 1.25rem; + + &:after { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 2px; + height: 100%; + background: #be2ee4; + background: linear-gradient(180deg,#be2ee4 0,#00a3ff); + } + } + + .nav-icon { + background: $g5-pepper; + color: $g20-white; + width: 210px; + font-family: $rubik; + font-weight: $medium; + padding: .9rem 1.1rem; + font-size: 1rem; + position: relative; .icon { - font-size: 1.65rem; - vertical-align: middle; - margin-right: 1.25rem; + display: inline-block; + font-size: 1.35rem; + margin-right: 1rem; } - strong { - color: $g20-white; - font-weight: $medium; + .nav-icon-label { + display: inline-block; + padding: 0; + font-size: 1rem; + } + + &:before, &:after { + content: ""; + position: absolute; + left: 0; + height: 2px; + z-index: 2; + width: 12px; + } + + &:before { + top: 0; + background: #be2ee4; + background: linear-gradient(90deg,#be2ee4 0,rgba(190,46,228,0)); + } + + &:after { + bottom: 0; + background: #00a3ff; + background: linear-gradient(90deg,#00a3ff 0,rgba(190,46,228,0)); + } + + &:first-child { + margin-right: 1.5rem; + } + + &.small { + display: flex; + justify-content: center; + align-items: center; + padding: 0; + width: 56px; + height: 56px; + flex-direction: column; + + .icon { + position: relative; + margin: 0; + } + + .nav-icon-label { + padding: 0; + margin-top: .75rem; + font-size: .7rem; + line-height: 0; + } } } } diff --git a/assets/styles/tools/_icomoon.scss b/assets/styles/tools/_icomoon.scss index 32f4e000f..282139f46 100644 --- a/assets/styles/tools/_icomoon.scss +++ b/assets/styles/tools/_icomoon.scss @@ -1,12 +1,13 @@ @font-face { font-family: 'icomoon'; - src: url('fonts/icomoon.eot?9r9zke'); - src: url('fonts/icomoon.eot?9r9zke#iefix') format('embedded-opentype'), - url('fonts/icomoon.ttf?9r9zke') format('truetype'), - url('fonts/icomoon.woff?9r9zke') format('woff'), - url('fonts/icomoon.svg?9r9zke#icomoon') format('svg'); + src: url('fonts/icomoon.eot?rgf1km'); + src: url('fonts/icomoon.eot?rgf1km#iefix') format('embedded-opentype'), + url('fonts/icomoon.ttf?rgf1km') format('truetype'), + url('fonts/icomoon.woff?rgf1km') format('woff'), + url('fonts/icomoon.svg?rgf1km#icomoon') format('svg'); font-weight: normal; font-style: normal; + font-display: block; } [class^="icon-"], [class*=" icon-"] { @@ -30,11 +31,8 @@ .icon-ui-wrench-nav:before { content: "\e93d"; } -.icon-ui-eye-closed:before { - content: "\e956"; -} -.icon-ui-eye-open:before { - content: "\e957"; +.icon-ui-user:before { + content: "\e93e"; } .icon-ui-chat:before { content: "\e93a"; @@ -42,12 +40,21 @@ .icon-ui-bell:before { content: "\e93b"; } +.icon-ui-users-trio:before { + content: "\e940"; +} .icon-ui-cloud:before { content: "\e93f"; } .icon-ui-nav-chat:before { content: "\e941"; } +.icon-ui-eye-closed:before { + content: "\e956"; +} +.icon-ui-eye-open:before { + content: "\e957"; +} .icon-ui-add-cell:before { content: "\e91f"; } diff --git a/layouts/shortcodes/nav-icon.html b/layouts/shortcodes/nav-icon.html index 6a39fae71..75d8e1e63 100644 --- a/layouts/shortcodes/nav-icon.html +++ b/layouts/shortcodes/nav-icon.html @@ -1,33 +1,54 @@ {{ $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") }} {{ .Scratch.Set "icon" "data-explorer" }} {{ .Scratch.Set "title" "Data Explorer" }} + {{ .Scratch.Set "short_title" "Explore" }} {{ else if eq $navIcon "dashboards" }} {{ .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" "Monitoring & Alerting" }} + {{ .Scratch.Set "title" "Alerts" }} + {{ .Scratch.Set "short_title" "Alerts" }} {{ else if or (eq $navIcon "disks") (eq $navIcon "load data") (eq $navIcon "load-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" }} -{{ else if or (eq $navIcon "feedback") }} - {{ .Scratch.Set "icon" "nav-chat" }} - {{ .Scratch.Set "title" "Feedback" }} + {{ .Scratch.Set "short_title" "Settings" }} {{ end }} {{ $icon := .Scratch.Get "icon" }} {{ $title := .Scratch.Get "title" }} +{{ $shortTitle := .Scratch.Get "short_title" }} -