From 3ad99a713386025e85d05bc7ad149ad9319cc0bd Mon Sep 17 00:00:00 2001 From: Jun Shindo <46585162+jay-es@users.noreply.github.com> Date: Sat, 9 Nov 2024 21:15:42 +0900 Subject: [PATCH] Add VueToronto banner to the docs --- .../inlined-scripts/restorePreference.js | 2 +- .vitepress/theme/components/Banner.vue | 81 +++++++++++++++++-- 2 files changed, 75 insertions(+), 8 deletions(-) diff --git a/.vitepress/inlined-scripts/restorePreference.js b/.vitepress/inlined-scripts/restorePreference.js index ebce4d3b7..b84fa6396 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__ = 'vuefes2024_ticket4' + window.__VUE_BANNER_ID__ = 'vt2024_1' restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed') })() diff --git a/.vitepress/theme/components/Banner.vue b/.vitepress/theme/components/Banner.vue index f42cf4dec..8700ff789 100644 --- a/.vitepress/theme/components/Banner.vue +++ b/.vitepress/theme/components/Banner.vue @@ -22,16 +22,31 @@ function dismiss() { - - Vue Fes Japan 2024、10月19日(土)開催 - + + VueConf Toronto + - Join the premier Vue.js conference + | 18-20 Nov 2024 - Toronto, Canada + + Register + + + + + + + Use code VUEJS + to get 15% off + @@ -50,7 +65,10 @@ html:not(.banner-dismissed) { font-weight: 600; color: #fff; background-color: var(--vt-c-green); - background-color: #35495e; /* Vue Fes */ + background: #11252b; + display: flex; + justify-content: center; + align-items: center; } .banner-dismissed .banner { @@ -75,8 +93,57 @@ button { transform: rotate(45deg); } -@media (max-width: 720px) { - a > span { +.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 { display: none; } }
+ VueConf Toronto + - Join the premier Vue.js conference + | 18-20 Nov 2024 - Toronto, Canada + + Register + +
+ Use code VUEJS + to get 15% off +