Skip to content

Commit d71b554

Browse files
committed
Revert "feat: add vuejsde conf 2024 banner (vuejs#2797)"
This reverts commit 294c48d.
1 parent e56ec8c commit d71b554

File tree

5 files changed

+73
-26
lines changed

5 files changed

+73
-26
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; (() => {
1+
;(() => {
22
const restore = (key, cls, def = false) => {
33
const saved = localStorage.getItem(key)
44
if (saved ? saved !== 'false' : def) {
@@ -8,6 +8,6 @@
88
restore('vue-docs-prefer-composition', 'prefer-composition', true)
99
restore('vue-docs-prefer-sfc', 'prefer-sfc', true)
1010

11-
window.__VUE_BANNER_ID__ = 'vuejsdeconf2024-promo-may'
11+
window.__VUE_BANNER_ID__ = 'vueconfus2024'
1212
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
1313
})()

.vitepress/theme/components/Banner.vue

Lines changed: 71 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,25 @@ function dismiss() {
2121
</script>
2222

2323
<template>
24-
<div class="banner banner-vuejsconf" v-if="open">
25-
<a href="https://conf.vuejs.de/?utm_source=vuejs&utm_medium=referral&utm_campaign=banner-placement&utm_content=banner"
26-
target="_blank">
27-
<picture>
28-
<source media="(min-width:1200px)" srcset="/vuejsde-conf/vuejsdeconf_banner_large.png" />
29-
<source media="(min-width:920px)" srcset="/vuejsde-conf/vuejsdeconf_banner_medium.png" />
30-
<img src="/vuejsde-conf/vuejsdeconf_banner_small.png" alt="" />
31-
</picture>
32-
</a>
33-
<div class="close-btn" @click.stop.prevent="dismiss">
24+
<div class="banner" v-if="open">
25+
<p class="vt-banner-text">
26+
<span class="vt-text-primary">VueConf US</span>
27+
<span class="vt-tagline"> - Join the official Vue.js conference</span>
28+
| May 15-17, 2024 <span class="vt-place"> - New Orleans, USA</span>
29+
<a
30+
target="_blank"
31+
class="vt-primary-action"
32+
href="https://vueconf.us?utm_source=vuejs&utm_content=top_banner"
33+
>Register <span class="vt-time-now">Now</span></a
34+
>
35+
</p>
36+
<button @click="dismiss">
3437
<VTIconPlus class="close" />
35-
</div>
38+
</button>
39+
<p class="vt-banner-text vt-coupon">
40+
<span class="vt-text-primary">Use code</span> VUEJSDOCS
41+
<span class="vt-text-primary">to get $100 off!</span>
42+
</p>
3643
</div>
3744
</template>
3845

@@ -57,6 +64,10 @@ html:not(.banner-dismissed) {
5764
font-weight: 600;
5865
color: #fff;
5966
background-color: var(--vt-c-green);
67+
background: #11252b;
68+
display: flex;
69+
justify-content: center;
70+
align-items: center;
6071
}
6172
6273
.banner-dismissed .banner {
@@ -81,22 +92,58 @@ button {
8192
transform: rotate(45deg);
8293
}
8394
84-
.banner-vuejsconf {
85-
background: linear-gradient(90deg, #fff 50%, #43b883 50%);
95+
.vt-banner-text {
96+
color: #fff;
97+
font-size: 16px;
8698
}
8799
88-
.banner-vuejsconf a {
89-
display: inline-block;
90-
margin: 0 auto;
100+
.vt-text-primary {
101+
color: #75c05e;
91102
}
92103
93-
.banner-vuejsconf .close-btn {
94-
top: 10px;
95-
right: 10px;
96-
z-index: 99;
97-
position: absolute;
98-
border-radius: 50%;
99-
padding: 10px;
100-
cursor: pointer;
104+
.vt-primary-action {
105+
background: #75c05e;
106+
color: #121c1a;
107+
padding: 8px 15px;
108+
border-radius: 5px;
109+
font-size: 14px;
110+
text-decoration: none;
111+
margin: 0 20px;
112+
font-weight: bold;
113+
}
114+
.vt-primary-action:hover {
115+
text-decoration: none;
116+
background: #5a9f45;
117+
}
118+
119+
@media (max-width: 1280px) {
120+
.banner .vt-banner-text {
121+
font-size: 14px;
122+
}
123+
.vt-tagline {
124+
display: none;
125+
}
126+
}
127+
128+
@media (max-width: 780px) {
129+
.vt-tagline {
130+
display: none;
131+
}
132+
.vt-coupon {
133+
display: none;
134+
}
135+
.vt-primary-action {
136+
margin: 0 10px;
137+
padding: 7px 10px;
138+
}
139+
.vt-time-now {
140+
display: none;
141+
}
142+
}
143+
144+
@media (max-width: 560px) {
145+
.vt-place {
146+
display: none;
147+
}
101148
}
102149
</style>
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)