From 2bd55eca2e7d8384ac50c94b049310dc6173f849 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Wed, 7 Jun 2023 00:42:31 +0530 Subject: [PATCH] fix(theme): properly show divider between navs (#2481) and hide return to top when already at top --- .../theme-default/components/VPLocalNav.vue | 42 +++++++++++++++++-- .../components/VPLocalNavOutlineDropdown.vue | 20 ++++----- .../theme-default/components/VPNavBar.vue | 6 --- 3 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/client/theme-default/components/VPLocalNav.vue b/src/client/theme-default/components/VPLocalNav.vue index 016bb7c4..39b26742 100644 --- a/src/client/theme-default/components/VPLocalNav.vue +++ b/src/client/theme-default/components/VPLocalNav.vue @@ -1,8 +1,12 @@ @@ -45,11 +71,19 @@ const { hasSidebar } = useSidebar() display: flex; justify-content: space-between; align-items: center; + border-top: 1px solid var(--vp-c-gutter); border-bottom: 1px solid var(--vp-c-gutter); padding-top: var(--vp-layout-top-height, 0px); width: 100%; background-color: var(--vp-local-nav-bg-color); - transition: border-color 0.5s, background-color 0.5s; +} + +.VPLocalNav.fixed { + position: fixed; +} + +.VPLocalNav.reached-top { + border-top-color: transparent; } @media (min-width: 960px) { diff --git a/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue b/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue index 7ae9c4b9..a879699b 100644 --- a/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue +++ b/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue @@ -1,12 +1,16 @@