Skip to content

Commit 42a313b

Browse files
authored
remove vuetoronto23 banner
1 parent 643f9cd commit 42a313b

File tree

3 files changed

+17
-78
lines changed

3 files changed

+17
-78
lines changed

.vitepress/inlined-scripts/restorePreference.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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__ = 'vt2023'
12-
restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
11+
// window.__VUE_BANNER_ID__ = ''
12+
// restore(`vue-docs-banner-${__VUE_BANNER_ID__}`, 'banner-dismissed')
1313
})()

.vitepress/theme/components/Banner.vue

Lines changed: 13 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,16 @@ function dismiss() {
2222

2323
<template>
2424
<div class="banner" v-if="open">
25-
<p class="vt-banner-text">
26-
<span class="vt-text-primary">VueConf Toronto</span>
27-
<span class="vt-tagline"> - Join the premier Vue.js conference</span>
28-
| 9-10 Nov 2023 <span class="vt-place"> - Toronto, Canada</span>
29-
<a
30-
target="_blank"
31-
class="vt-primary-action"
32-
href="https://vuetoronto.com?utm_source=vuejs&utm_content=top_banner"
33-
>Register <span class="vt-time-now">Now</span></a
34-
>
35-
</p>
25+
<a target="_blank"></a>
3626
<button @click="dismiss">
3727
<VTIconPlus class="close" />
3828
</button>
39-
<p class="vt-banner-text vt-coupon">
40-
<span class="vt-text-primary">Use code</span> VUEJS
41-
<span class="vt-text-primary">to get 15% off</span>
42-
</p>
4329
</div>
4430
</template>
4531

4632
<style>
4733
html:not(.banner-dismissed) {
48-
--vt-banner-height: 60px;
34+
--vt-banner-height: 30px;
4935
}
5036
</style>
5137

@@ -64,10 +50,12 @@ html:not(.banner-dismissed) {
6450
font-weight: 600;
6551
color: #fff;
6652
background-color: var(--vt-c-green);
67-
background: #11252b;
68-
display: flex;
69-
justify-content: center;
70-
align-items: center;
53+
background: linear-gradient(
54+
90deg,
55+
rgba(66, 184, 131, 1) 0%,
56+
rgba(39, 179, 137, 1) 19%,
57+
rgba(100, 126, 255, 1) 100%
58+
);
7159
}
7260
7361
.banner-dismissed .banner {
@@ -82,7 +70,7 @@ button {
8270
position: absolute;
8371
right: 0;
8472
top: 0;
85-
padding: 20px 10px;
73+
padding: 5px;
8674
}
8775
8876
.close {
@@ -91,59 +79,10 @@ button {
9179
fill: #fff;
9280
transform: rotate(45deg);
9381
}
94-
95-
.vt-banner-text {
96-
color: #fff;
97-
font-size: 16px;
98-
}
99-
100-
.vt-text-primary {
101-
color: #75c05e;
102-
}
103-
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 {
82+
/*
83+
@media (max-width: 720px) {
84+
a > span {
14685
display: none;
14786
}
148-
}
87+
} */
14988
</style>

.vitepress/theme/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import {
99
} from './components/preferences'
1010
import SponsorsAside from './components/SponsorsAside.vue'
1111
import VueSchoolLink from './components/VueSchoolLink.vue'
12-
import Banner from './components/Banner.vue'
12+
// import Banner from './components/Banner.vue'
1313
// import TextAd from './components/TextAd.vue'
1414

1515
export default Object.assign({}, VPTheme, {
1616
Layout: () => {
1717
// @ts-ignore
1818
return h(VPTheme.Layout, null, {
19-
banner: () => h(Banner),
19+
// banner: () => h(Banner),
2020
'sidebar-top': () => h(PreferenceSwitch),
2121
'aside-mid': () => h(SponsorsAside)
2222
})

0 commit comments

Comments
 (0)