From 1a8b6f6db3f50579972fe0c3f8f24f3804f40d34 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 30 Oct 2023 06:38:20 +0800 Subject: [PATCH] Revert "Add Vue Toronto banner - schedule 2 (#2536)" (#2553) This reverts commit 71ecfd5fb8f1ac82c4d5ee4ef72f4685d119040e. --- .../inlined-scripts/restorePreference.js | 4 +- .vitepress/theme/components/Banner.vue | 88 +++---------------- .vitepress/theme/index.ts | 4 +- 3 files changed, 17 insertions(+), 79 deletions(-) diff --git a/.vitepress/inlined-scripts/restorePreference.js b/.vitepress/inlined-scripts/restorePreference.js index edefb7d00c..5e18b50ffa 100644 --- a/.vitepress/inlined-scripts/restorePreference.js +++ b/.vitepress/inlined-scripts/restorePreference.js @@ -8,6 +8,6 @@ restore('vue-docs-prefer-composition', 'prefer-composition', true) restore('vue-docs-prefer-sfc', 'prefer-sfc', true) - window.__VUE_BANNER_ID__ = 'vt2023-2' - restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed') + // window.__VUE_BANNER_ID__ = '' + // restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed') })() diff --git a/.vitepress/theme/components/Banner.vue b/.vitepress/theme/components/Banner.vue index 579167505e..6730fcd48d 100644 --- a/.vitepress/theme/components/Banner.vue +++ b/.vitepress/theme/components/Banner.vue @@ -22,31 +22,16 @@ function dismiss() { @@ -65,10 +50,12 @@ html:not(.banner-dismissed) { font-weight: 600; color: #fff; background-color: var(--vt-c-green); - background: #11252b; - display: flex; - justify-content: center; - align-items: center; + background: linear-gradient( + 90deg, + rgba(66, 184, 131, 1) 0%, + rgba(39, 179, 137, 1) 19%, + rgba(100, 126, 255, 1) 100% + ); } .banner-dismissed .banner { @@ -83,7 +70,7 @@ button { position: absolute; right: 0; top: 0; - padding: 20px 10px; + padding: 5px; } .close { @@ -92,59 +79,10 @@ button { fill: #fff; transform: rotate(45deg); } - -.vt-banner-text { - color: #fff; - font-size: 16px; -} - -.vt-text-primary { - color: #75c05e; -} - -.vt-primary-action { - background: #75c05e; - color: #121c1a; - padding: 8px 15px; - border-radius: 5px; - font-size: 14px; - text-decoration: none; - margin: 0 20px; - font-weight: bold; -} -.vt-primary-action:hover { - text-decoration: none; - background: #5a9f45; -} - -@media (max-width: 1280px) { - .banner .vt-banner-text { - font-size: 14px; - } - .vt-tagline { - display: none; - } -} - -@media (max-width: 780px) { - .vt-tagline { - display: none; - } - .vt-coupon { - display: none; - } - .vt-primary-action { - margin: 0 10px; - padding: 7px 10px; - } - .vt-time-now { - display: none; - } -} - -@media (max-width: 560px) { - .vt-place { +/* +@media (max-width: 720px) { + a > span { display: none; } -} +} */ diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index 11dd675691..7084831abc 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -9,14 +9,14 @@ import { } from './components/preferences' import SponsorsAside from './components/SponsorsAside.vue' import VueSchoolLink from './components/VueSchoolLink.vue' -import Banner from './components/Banner.vue' +// import Banner from './components/Banner.vue' // import TextAd from './components/TextAd.vue' export default Object.assign({}, VPTheme, { Layout: () => { // @ts-ignore return h(VPTheme.Layout, null, { - banner: () => h(Banner), + // banner: () => h(Banner), 'sidebar-top': () => h(PreferenceSwitch), 'aside-mid': () => h(SponsorsAside) })