diff --git a/.vitepress/inlined-scripts/restorePreference.js b/.vitepress/inlined-scripts/restorePreference.js index f6bd4715..6eee492a 100644 --- a/.vitepress/inlined-scripts/restorePreference.js +++ b/.vitepress/inlined-scripts/restorePreference.js @@ -1,4 +1,4 @@ -; (() => { +;(() => { const restore = (key, cls, def = false) => { const saved = localStorage.getItem(key) if (saved ? saved !== 'false' : def) { @@ -8,6 +8,6 @@ restore('vue-docs-prefer-composition', 'prefer-composition', true) restore('vue-docs-prefer-sfc', 'prefer-sfc', true) - window.__VUE_BANNER_ID__ = 'vuejsdeconf2024-promo-may' + window.__VUE_BANNER_ID__ = 'vueconfus2024' restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed') })() diff --git a/.vitepress/theme/components/Banner.vue b/.vitepress/theme/components/Banner.vue index 1bdc29f8..f10b9e22 100644 --- a/.vitepress/theme/components/Banner.vue +++ b/.vitepress/theme/components/Banner.vue @@ -21,18 +21,25 @@ function dismiss() { @@ -57,6 +64,10 @@ 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; } .banner-dismissed .banner { @@ -81,22 +92,58 @@ button { transform: rotate(45deg); } -.banner-vuejsconf { - background: linear-gradient(90deg, #fff 50%, #43b883 50%); +.vt-banner-text { + color: #fff; + font-size: 16px; } -.banner-vuejsconf a { - display: inline-block; - margin: 0 auto; +.vt-text-primary { + color: #75c05e; } -.banner-vuejsconf .close-btn { - top: 10px; - right: 10px; - z-index: 99; - position: absolute; - border-radius: 50%; - padding: 10px; - cursor: pointer; +.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 { + display: none; + } } diff --git a/src/public/vuejsde-conf/vuejsdeconf_banner_large.png b/src/public/vuejsde-conf/vuejsdeconf_banner_large.png deleted file mode 100644 index 4724c5db..00000000 Binary files a/src/public/vuejsde-conf/vuejsdeconf_banner_large.png and /dev/null differ diff --git a/src/public/vuejsde-conf/vuejsdeconf_banner_medium.png b/src/public/vuejsde-conf/vuejsdeconf_banner_medium.png deleted file mode 100644 index 44c4d473..00000000 Binary files a/src/public/vuejsde-conf/vuejsdeconf_banner_medium.png and /dev/null differ diff --git a/src/public/vuejsde-conf/vuejsdeconf_banner_small.png b/src/public/vuejsde-conf/vuejsdeconf_banner_small.png deleted file mode 100644 index affc643f..00000000 Binary files a/src/public/vuejsde-conf/vuejsdeconf_banner_small.png and /dev/null differ