From 24ae787518cede24770e6ac9dee576f39adfe3be Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Fri, 12 Jan 2024 20:32:22 -0500 Subject: [PATCH] Update left navigation layout (#6137) * Collections with no pages under the main page should not have an expander Signed-off-by: Fanit Kolchina * Update left navigation layout Signed-off-by: Fanit Kolchina * Add media query for back link Signed-off-by: Fanit Kolchina --------- Signed-off-by: Fanit Kolchina --- _layouts/default.html | 2 +- _sass/custom/custom.scss | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index bd82803c..574f0e39 100755 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -107,7 +107,7 @@ layout: table_wrappers {% assign collection_url_path = collection_key | append: "/" %} {% assign category_comparison_url = "/" | append: collection_url_path %} - {%- if collection.size > 0 -%} + {%- if collection.size > 1 -%} .nav-list:nth-of-type(1) { .nav-category { text-align: start; display: block; + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} + +.nav-list-expander { + margin-right: 0.5rem; } .main-content { @@ -905,10 +911,7 @@ main { } .site-nav.nav-open { - padding-top: .5rem; - @include mq(md) { - padding-top: 2rem; - } + padding-top: 0; } .label { @@ -951,13 +954,13 @@ main { top: 0; z-index: 9999999; background-color: $sidebar-color; + border-bottom: 1px solid #eeebee; } version-selector { z-index: 1; font-size: .9rem; - margin: 0.5rem 3px; - + margin: 0.5rem 3px 1rem 3px; --normal-bg: linear-gradient(#{lighten($blue-300, 5%)}, #{darken($blue-300, 2%)}); --hover-bg: linear-gradient(#{lighten($blue-300, 2%)}, #{darken($blue-300, 4%)}); --link-color: #{$blue-300}; @@ -992,16 +995,18 @@ body { text-align: start; display: block; font-size: 0.9rem; - padding-right: 2rem; - padding-left: 2rem; - padding-top: 0.5rem; - margin-bottom: 1rem; + padding: 0.5rem 1rem; + margin-top: 1rem; + @include mq(md) { + padding: 0.5rem 2rem; + } } .site-category { @extend .back-link; padding-top: 1.5rem; padding-bottom: 0.5rem; + margin-top: 0; font-size: 0.8rem; color: $blue-dk-300; font-weight: 600;