From 8c2c2df196c65f05708da5e51cad70c207e14ccd Mon Sep 17 00:00:00 2001 From: Nico Devs Date: Wed, 23 Jun 2021 14:02:11 -0300 Subject: [PATCH 1/2] Update Vue School Summer Sale banner --- src/.vuepress/theme/components/BannerTop.vue | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/.vuepress/theme/components/BannerTop.vue b/src/.vuepress/theme/components/BannerTop.vue index 53010d5539..49935ce376 100644 --- a/src/.vuepress/theme/components/BannerTop.vue +++ b/src/.vuepress/theme/components/BannerTop.vue @@ -11,7 +11,7 @@ Backpack
- Less than 48 hours left for the Vue School offer + Extended! Last few hours for the Vue School offer
GET ACCESS @@ -72,7 +72,7 @@ $topBannerHeightMobile ?= 3.125rem .vs-logo position: absolute display: none - left: 40px + left: 20px @media (min-width: 900px) display: block @@ -85,10 +85,12 @@ $topBannerHeightMobile ?= 3.125rem position: absolute @media (min-width: 680px) position: static - margin-right: 14px + margin-right: 4px img height: 50px @media (min-width: 680px) + height: 56px + @media (min-width: 900px) height: 74px .vs-slogan @@ -155,13 +157,13 @@ $topBannerHeightMobile ?= 3.125rem // Adjust titles margin and padding for anchor links .theme-container.has-top-banner {$contentClass}:not(.custom) - h1, h2, h3, h4, h5, h6 - margin-top (0.5rem - $topBannerHeight - $navbarHeight) - padding-top ($navbarHeight + $topBannerHeight + 1rem) + h1, h2, h3 + margin-top (2rem - $topBannerHeight - $navbarHeight) + padding-top ($navbarHeight + $topBannerHeight + 2rem) @media (min-width: 680px) .theme-container.has-top-banner {$contentClass}:not(.custom) - h1, h2, h3, h4, h5, h6 - margin-top (0.5rem - $topBannerHeightMobile - $navbarHeight) - padding-top ($navbarHeight + $topBannerHeightMobile + 1rem) + h1, h2, h3 + margin-top (2rem - $topBannerHeightMobile - $navbarHeight) + padding-top ($navbarHeight + $topBannerHeightMobile + 2rem) From 35f7254f9a3e49a1432fbb46e3590ad0a36ee714 Mon Sep 17 00:00:00 2001 From: Nico Devs Date: Thu, 24 Jun 2021 10:45:28 -0300 Subject: [PATCH 2/2] Fix header padding and margin when Vue School banner is open --- src/.vuepress/theme/components/BannerTop.vue | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/.vuepress/theme/components/BannerTop.vue b/src/.vuepress/theme/components/BannerTop.vue index 49935ce376..6e18821d4a 100644 --- a/src/.vuepress/theme/components/BannerTop.vue +++ b/src/.vuepress/theme/components/BannerTop.vue @@ -156,14 +156,12 @@ $topBannerHeightMobile ?= 3.125rem // Adjust titles margin and padding for anchor links .theme-container.has-top-banner - {$contentClass}:not(.custom) - h1, h2, h3 - margin-top (2rem - $topBannerHeight - $navbarHeight) - padding-top ($navbarHeight + $topBannerHeight + 2rem) -@media (min-width: 680px) - .theme-container.has-top-banner - {$contentClass}:not(.custom) - h1, h2, h3 - margin-top (2rem - $topBannerHeightMobile - $navbarHeight) - padding-top ($navbarHeight + $topBannerHeightMobile + 2rem) + {$contentClass}:not(.custom) > h1, + {$contentClass}:not(.custom) > h2, + {$contentClass}:not(.custom) > h3 + margin-top (0.5rem - $navbarHeight - $topBannerHeightMobile) + padding-top ($navbarHeight + 1rem + $topBannerHeightMobile) + @media (min-width: 680px) + margin-top (0.5rem - $navbarHeight - $topBannerHeight) + padding-top ($navbarHeight + 1rem + $topBannerHeight)