From d008dc3d859400bd0bd3d33cdc6acb1298adcf76 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Fri, 16 Apr 2021 12:13:06 +0100 Subject: [PATCH] ui: Hoist DC menu into the top navigation bar (#10034) * Add story for %main-nav-vertical plus additions for hoisting menu items * Make sure we don't source app.css twice * Hoist the DC menu --- .../consul-ui/app/components/app/index.scss | 10 +++ .../app/components/hashicorp-consul/index.hbs | 79 ++++++++++--------- .../components/hashicorp-consul/index.scss | 7 ++ .../components/main-nav-vertical/README.mdx | 71 +++++++++++++++++ .../components/main-nav-vertical/debug.scss | 29 +++++++ .../components/main-nav-vertical/layout.scss | 5 ++ .../components/main-nav-vertical/skin.scss | 6 ++ ui/packages/consul-ui/app/styles/debug.scss | 13 ++- .../lib/startup/templates/head.html.js | 7 +- 9 files changed, 183 insertions(+), 44 deletions(-) create mode 100644 ui/packages/consul-ui/app/components/main-nav-vertical/README.mdx create mode 100644 ui/packages/consul-ui/app/components/main-nav-vertical/debug.scss diff --git a/ui/packages/consul-ui/app/components/app/index.scss b/ui/packages/consul-ui/app/components/app/index.scss index 8dc88a2ab3..eea9542d0c 100644 --- a/ui/packages/consul-ui/app/components/app/index.scss +++ b/ui/packages/consul-ui/app/components/app/index.scss @@ -25,6 +25,16 @@ @extend %main-nav-horizontal; margin-left: auto; } +%main-nav-vertical-hoisted { + top: 11px; +} +%main-nav-vertical-hoisted > .popover-menu > label > button { + @extend %main-nav-horizontal-action; + border: none; +} +%main-nav-vertical-hoisted.is-active > label > * { + @extend %main-nav-horizontal-action-active; +} %main-nav-sidebar, main { @extend %transition-pushover; diff --git a/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs b/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs index e5c467e34b..825361cf32 100644 --- a/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs +++ b/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs @@ -18,14 +18,54 @@ <:main-nav> {{#if @dc}}