From eb2c9cbbe0f4f18079bdcefbfdbfd4db5ddd2325 Mon Sep 17 00:00:00 2001 From: Dana Date: Sat, 3 Oct 2020 17:04:58 -0400 Subject: [PATCH 1/2] feat: add docs menu collapse functionality feat: hide border for first menu section clean-up --- src/assets/images/icon-arrow.svg | 18 ++++++++ src/assets/style/sidebar.scss | 16 +++---- src/layouts/Docs.vue | 47 +++++++++++--------- src/layouts/DocsMenu.vue | 74 ++++++++++++++++++++++++++++++++ 4 files changed, 127 insertions(+), 28 deletions(-) create mode 100644 src/assets/images/icon-arrow.svg create mode 100644 src/layouts/DocsMenu.vue diff --git a/src/assets/images/icon-arrow.svg b/src/assets/images/icon-arrow.svg new file mode 100644 index 000000000..c81a1c528 --- /dev/null +++ b/src/assets/images/icon-arrow.svg @@ -0,0 +1,18 @@ + + + + arrow_back_ios + Created with Sketch. + + + + + + + + + + + + + diff --git a/src/assets/style/sidebar.scss b/src/assets/style/sidebar.scss index a0e735d69..e7cb9c049 100644 --- a/src/assets/style/sidebar.scss +++ b/src/assets/style/sidebar.scss @@ -43,12 +43,13 @@ font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; - margin: 15px 0 15px; - padding-top: 20px; + margin-bottom: 0; + padding: 10px 0px; border-top: 1px solid var(--border-color); - &:first-of-type { - border:0; - } + } + + .menu-section:first-of-type h3 { + border: 0; } p { @@ -60,13 +61,12 @@ color: currentColor; opacity: 1; font-weight: 400; - display: flex; text-decoration: none; &.active--exact { color: var(--primary-color-dark); } - + &:hover { color: var(--primary-color); } @@ -127,7 +127,7 @@ margin:0; order: 2; padding-bottom: 150px; - + } + .section { margin-left: 0; width: 100%; diff --git a/src/layouts/Docs.vue b/src/layouts/Docs.vue index 6e7eff37c..5c9af023e 100644 --- a/src/layouts/Docs.vue +++ b/src/layouts/Docs.vue @@ -2,14 +2,7 @@
@@ -21,24 +14,36 @@

-