From eabae3bf6f934a2c0ff2518257378e593219082b Mon Sep 17 00:00:00 2001 From: Ben Hong Date: Tue, 14 Jul 2020 10:44:37 -0400 Subject: [PATCH 1/4] feature (#170): add temporary beta banner --- src/.vuepress/components/BetaBanner.vue | 11 ++++ src/.vuepress/styles/index.styl | 15 ++++++ src/.vuepress/theme/components/Sidebar.vue | 7 +-- src/.vuepress/theme/layouts/Layout.vue | 63 +++++++++------------- src/.vuepress/theme/styles/config.styl | 1 + src/.vuepress/theme/styles/wrapper.styl | 6 +-- 6 files changed, 57 insertions(+), 46 deletions(-) create mode 100644 src/.vuepress/components/BetaBanner.vue diff --git a/src/.vuepress/components/BetaBanner.vue b/src/.vuepress/components/BetaBanner.vue new file mode 100644 index 0000000000..d33a4f91f0 --- /dev/null +++ b/src/.vuepress/components/BetaBanner.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/.vuepress/styles/index.styl b/src/.vuepress/styles/index.styl index 1ed44dd2bd..0785548d63 100644 --- a/src/.vuepress/styles/index.styl +++ b/src/.vuepress/styles/index.styl @@ -125,6 +125,21 @@ } } +.beta-banner + position fixed + z-index 20 + top $navbarHeight + left 0 + right 0 + height 3rem + display flex + align-items center + justify-content center + background-color #fffedb + box-sizing border-box + border-bottom 1px solid $borderColor + font-weight bold + .scrimba, .vueschool { background-color: #e7ecf3; diff --git a/src/.vuepress/theme/components/Sidebar.vue b/src/.vuepress/theme/components/Sidebar.vue index e70e33367a..2ee765aae0 100644 --- a/src/.vuepress/theme/components/Sidebar.vue +++ b/src/.vuepress/theme/components/Sidebar.vue @@ -4,10 +4,7 @@ - + @@ -45,7 +42,7 @@ export default { font-size 1.1em padding 0.5rem 0 0.5rem 1.5rem & > .sidebar-links - padding 1.5rem 0 + padding calc(1.5rem + 3rem) 0 // add $betaBannerHeight & > li > a.sidebar-link font-size 1.1em line-height 1.7 diff --git a/src/.vuepress/theme/layouts/Layout.vue b/src/.vuepress/theme/layouts/Layout.vue index 3298070997..290494052b 100644 --- a/src/.vuepress/theme/layouts/Layout.vue +++ b/src/.vuepress/theme/layouts/Layout.vue @@ -5,20 +5,12 @@ @touchstart="onTouchStart" @touchend="onTouchEnd" > - - -