diff --git a/assets/scss/menu.scss b/assets/scss/menu.scss index 1e820d6..5542b27 100644 --- a/assets/scss/menu.scss +++ b/assets/scss/menu.scss @@ -1,4 +1,4 @@ -// (C) 2025 GoodData Corporation +// (C) 2023 GoodData Corporation @import "variables/variables"; .td-sidebar { @@ -14,15 +14,15 @@ .gd-docs-menu { position: fixed; - top: $header-first-nav-height + 1px; + top: $header-first-nav-height-desktop + 1px; bottom: 0; left: -100%; - z-index: 33; + z-index: 32; overflow: auto; width: calc(100% - 55px); flex: 1 1 auto; - padding: 32px 40px; - background: #f8f8f8; + padding: 0 20px 20px; + background: $color-mist-gray; transition: $transition; @include mq(large) { @@ -34,6 +34,7 @@ z-index: 0; width: 100%; max-width: 380px; + padding: 32px 40px; @supports(position: sticky) { position: sticky; @@ -46,43 +47,64 @@ opacity: 0; } - &__mobile-trigger { - display: none; - } - - &__mobile-icon { + &__mobile-btn { position: fixed; - top: 80px; + top: $header-first-nav-height-desktop; + left: 10px; + z-index: 34; display: flex; justify-content: center; align-items: center; width: 55px; height: $header-second-nav-height; - left: 10px; - z-index: 34; + padding: 0; + background: transparent; + border: none; transition: $transition; cursor: pointer; + &:focus { + outline: 2px solid $color-shocking-pink; + outline-offset: 2px; + } + + @include mq(large) { + display: none; + } + } + + &__mobile-icon { + position: relative; + display: flex; + justify-content: center; + align-items: center; + width: 26px; + height: 22px; + &::before { content: url("../img/burger.svg"); display: block; width: 26px; height: 22px; } + } - &::after { - content: ""; + &__mobile-btn[aria-expanded="true"] { + left: calc(100% - 55px); + + .gd-docs-menu__mobile-icon::before { display: none; + } + + .gd-docs-menu__mobile-icon::after { + content: ""; + display: block; width: 31px; height: 31px; background-image: url("../img/close.svg"); background-repeat: no-repeat; background-size: contain; } - - @include mq(large) { - display: none; - } } &__mobile-bg { @@ -99,21 +121,10 @@ display: none; } } - &__mobile-trigger:checked ~ &, - &__mobile-trigger:checked ~ &__mobile-bg { - left: 0; - } - - &__mobile-trigger:checked ~ &__mobile-icon { - left: calc(100% - 55px); - - &::before { - display: none; - } - &::after { - display: block; - } + &__mobile-btn[aria-expanded="true"] ~ &, + &__mobile-btn[aria-expanded="true"] ~ &__mobile-bg { + left: 0; } & > &-section { @@ -139,6 +150,14 @@ } } + &-section-wrapper { + display: none; + + &.expanded { + display: block !important; + } + } + &-page__label ~ &-section { padding-left: 0; } @@ -191,25 +210,43 @@ } } - &__toggle { - display: none; - } - - &__chevron { + &__toggle-btn { + display: flex; + align-items: center; + justify-content: center; margin: 4px 0 0; + padding: 4px; + background: transparent; + border: none; cursor: pointer; - - svg { + transition: none; + + // Add focus styles for keyboard navigation + &:focus { + outline: 2px solid -webkit-focus-ring-color; + outline-offset: 2px; + border-radius: 1px; + } + + // SVG rotation based on expanded state + &[aria-expanded="false"] .gd-docs-menu-page__chevron svg { transform: rotate(180deg); } - } - - &__toggle:checked ~ &__title &__chevron { - svg { + + &[aria-expanded="true"] .gd-docs-menu-page__chevron svg { transform: rotate(0deg); } } + &__chevron { + display: flex; + margin: 0; + } + + &__toggle { + display: none; + } + &__label { display: block; flex: 0 0 auto; @@ -221,19 +258,13 @@ } } - &-page__toggle ~ &-section { - display: none; - } - - &-page__toggle:checked ~ &-section { - display: block; - } .dropdown-toggle { display: flex; justify-content: space-between; width: 100%; height: 36px; margin-bottom: 10px; + margin-top: 10px; padding: 10px 16px; border: 1px solid $color-dove-gray; border-radius: 4px; @@ -253,13 +284,4 @@ display: none; } } - h4 { - margin-top: 0; - margin-bottom: 1rem; - padding-bottom: 1rem; - border-bottom: 1px solid $color-dove-gray; - font-family: $gdfont-demibold; - font-size: 21px; - line-height: 1.25; - } -} \ No newline at end of file +} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 80ea98f..022a12f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -6,6 +6,9 @@ {{ partial "head.html" . }} {{ partial "meta-version.html" . }} + {{ if .Params.externalLink }} + + {{ end }} {{ partial "gtm-body.html" }} @@ -15,14 +18,15 @@
+ {{ partial "navbar-breadcrumb.html" . }}
-
+
+ {{ partial "sidebar.html" . }}
-
+
+ {{ partial "toc.html" . }}
-
+
{{ partial "version-banner.html" . }} {{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }} {{ if .Draft }} @@ -39,8 +43,6 @@

DRAFT

{{ partial "custom-scripts.html" . }} {{ partial "scripts.html" . }} - {{ if ne .Page.Params.type "search-results" }} - {{ partial "search.html" . }} - {{ end }} + {{ partial "search.html" . }} diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 5e2ba88..022a12f 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -18,6 +18,7 @@
+ {{ partial "navbar-breadcrumb.html" . }}
{{ partial "sidebar.html" . }} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index f90bb7d..fcd852a 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,6 +1,7 @@ {{/* (C) 2023 GoodData Corporation */}} - - +