Skip to content

Commit d1b5bc8

Browse files
committed
Revert "Vuejsde conf banner september 16 22 2024 (vuejs#2798)"
This reverts commit 17bd491.
1 parent cfcf01e commit d1b5bc8

11 files changed

+17
-48
lines changed
Lines changed: 3 additions & 3 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-september'
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: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,17 @@ function dismiss() {
2121
</script>
2222

2323
<template>
24-
<div class="banner banner-vuejsconf" v-if="open">
25-
<a href="https://conf.vuejs.de/tickets/?voucher=VUEJS_SPECIAL_OFFER&utm_source=vuejs&utm_medium=referral&utm_campaign=banner-placement&utm_content=banner"
26-
target="_blank">
27-
<picture>
28-
<source media="(min-width:1260px)"
29-
srcset="/vuejsde-conf/vuejsdeconf_banner_large.png, /vuejsde-conf/vuejsdeconf_banner_large_2x.png 2x" />
30-
<source media="(min-width:970px)"
31-
srcset="/vuejsde-conf/vuejsdeconf_banner_medium.png, /vuejsde-conf/vuejsdeconf_banner_medium_2x.png 2x" />
32-
<source media="(min-width:576px)"
33-
srcset="/vuejsde-conf/vuejsdeconf_banner_small.png, /vuejsde-conf/vuejsdeconf_banner_small_2x.png 2x" />
34-
<source media="(min-width:320px)"
35-
srcset="/vuejsde-conf/vuejsdeconf_banner_smallest.png, /vuejsde-conf/vuejsdeconf_banner_smallest_2x.png 2x"
36-
alt="" />
37-
<img src="/vuejsde-conf/vuejsdeconf_banner_smallest_2x.png" alt="" />
38-
</picture>
39-
</a>
40-
<div class="close-btn" @click.stop.prevent="dismiss">
24+
<div class="banner" v-if="open">
25+
<a target="_blank"></a>
26+
<button @click="dismiss">
4127
<VTIconPlus class="close" />
42-
</div>
28+
</button>
4329
</div>
4430
</template>
4531

4632
<style>
4733
html:not(.banner-dismissed) {
48-
--vt-banner-height: 72px;
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: linear-gradient(90deg,
68-
rgba(66, 184, 131, 1) 0%,
69-
rgba(39, 179, 137, 1) 19%,
70-
rgba(100, 126, 255, 1) 100%);
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 {
@@ -88,28 +76,9 @@ button {
8876
.close {
8977
width: 20px;
9078
height: 20px;
91-
fill: #000;
79+
fill: #fff;
9280
transform: rotate(45deg);
9381
}
94-
95-
.banner-vuejsconf {
96-
background: linear-gradient(90deg, #fff 50%, #6f97c4 50%);
97-
}
98-
99-
.banner-vuejsconf a {
100-
display: inline-block;
101-
margin: 0 auto;
102-
}
103-
104-
.banner-vuejsconf .close-btn {
105-
top: 0px;
106-
left: 0px;
107-
z-index: 99;
108-
position: absolute;
109-
border-radius: 50%;
110-
cursor: pointer;
111-
}
112-
11382
/*
11483
@media (max-width: 720px) {
11584
a > span {

.vitepress/theme/index.ts

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

1616
export default Object.assign({}, VPTheme, {
1717
Layout: () => {
1818
// @ts-ignore
1919
return h(VPTheme.Layout, null, {
20-
banner: () => h(Banner),
20+
// banner: () => h(Banner),
2121
'sidebar-top': () => h(PreferenceSwitch),
2222
'sidebar-bottom': () => h(SecurityUpdateBtn),
2323
'aside-mid': () => h(SponsorsAside)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)