Skip to content

Commit 89ffabe

Browse files
authored
Vue School Free Weekend Banner (#1359)
1 parent 17d1ecf commit 89ffabe

16 files changed

+316
-381
lines changed

β€Ždocs/.vitepress/components/VueSchool/BannerCoins.vueβ€Ž

Lines changed: 0 additions & 131 deletions
This file was deleted.

β€Ždocs/.vitepress/components/VueSchool/BannerTop.vueβ€Ž

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,33 @@
11
<template>
22
<a
33
id="vs"
4-
href="https://vueschool.io/sales/blackfriday?friend=vuerouter"
4+
href="https://vueschool.io/free-weekend?friend=vuerouter"
55
target="_blank"
66
rel="noreferrer"
77
>
8-
<BannerCoins />
8+
<div class="vs-logo">
9+
<img src="/images/vueschool/vs-iso.svg" class="logo-small">
10+
<img src="/images/vueschool/vs-logo.svg" class="logo-big">
11+
</div>
912
<div class="vs-core">
10-
<div class="vs-logo">
11-
<img src="/images/vueschool/vueschool_blackfriday_logo.svg">
12-
</div>
1313
<div class="vs-slogan">
1414
<div class="vs-slogan-subtitle">
15-
Access to all Vue Courses at Vue School
15+
VUE 3 MASTERCLASS - FREE WEEKEND
1616
</div>
1717
<div class="vs-slogan-title">
18-
Cyber Monday <strong>35% OFF</strong> - Closes Soon
18+
Register at <strong>vueschool.io/free-weekend</strong>
1919
</div>
2020
</div>
2121
<div class="vs-button">
22-
Get Discount
22+
Free Access
2323
</div>
24-
<img class="vs-tag" src="/images/vueschool/extended.svg" alt="Extended">
2524
</div>
2625
<div id="vs-close" class="vs-close" @click.stop.prevent="$emit('close')">
27-
<img src="/images/vueschool/vueschool_close.svg" alt="Close">
26+
<img src="/images/vueschool/vs-close.svg" alt="Close">
2827
</div>
2928
</a>
3029
</template>
3130

32-
<script>
33-
import BannerCoins from './BannerCoins.vue'
34-
35-
export default {
36-
components: {
37-
BannerCoins
38-
}
39-
}
40-
</script>
41-
4231
<style>
4332
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600&display=swap');
4433
@@ -58,25 +47,45 @@ export default {
5847
z-index: 100;
5948
height: 5rem;
6049
line-height: 1;
61-
background-image: url(/images/vueschool/vueschool_banner_mobile.png);
50+
background-image: url(/images/vueschool/vs-fw-bg.svg);
6251
background-size: cover;
6352
background-repeat: no-repeat;
6453
}
6554
#vs:hover {
6655
text-decoration: none;
6756
}
57+
#vs .vs-logo {
58+
position: absolute;
59+
left: 20px;
60+
top: 20px;
61+
}
62+
#vs .vs-logo .logo-small {
63+
display: none;
64+
}
65+
#vs .vs-logo .logo-big {
66+
display: none;
67+
}
68+
@media (min-width: 768px) {
69+
#vs .vs-logo .logo-small {
70+
display: inline-block;
71+
}
72+
}
73+
@media (min-width: 1024px) {
74+
#vs .vs-logo .logo-small {
75+
display: none;
76+
}
77+
#vs .vs-logo .logo-big {
78+
display: inline-block;
79+
}
80+
}
6881
@media (min-width: 680px) {
6982
#vs {
7083
height: 5rem;
71-
justify-content: center;
72-
background-image: none;
7384
}
7485
}
7586
#vs:hover .vs-core .vs-button {
7687
background: linear-gradient(261deg, #e61463 100%, #db5248 3%);
77-
}
78-
#vs .vs-core {
79-
display: none;
88+
border-color: #e61463;
8089
}
8190
@media (min-width: 680px) {
8291
#vs .vs-core {
@@ -88,47 +97,56 @@ export default {
8897
font-family: Archivo;
8998
color: #fff;
9099
margin-left: 8px;
100+
text-align: center;
91101
}
92102
@media (min-width: 680px) {
93103
#vs .vs-core .vs-slogan {
94104
margin-left: 24px;
95105
}
96106
}
97107
#vs .vs-core .vs-slogan .vs-slogan-subtitle {
98-
font-size: 12px;
108+
font-size: 14px;
109+
color: #47b785;
110+
font-weight: bold;
99111
}
100112
@media (min-width: 680px) {
101113
#vs .vs-core .vs-slogan .vs-slogan-subtitle {
102-
font-size: 14px;
114+
font-size: 18px;
103115
}
104116
}
105117
#vs .vs-core .vs-slogan .vs-slogan-title {
106118
margin-top: 6px;
107119
font-size: 16px;
108-
font-weight: 600;
109120
}
110121
@media (min-width: 680px) {
111122
#vs .vs-core .vs-slogan .vs-slogan-title {
112123
font-size: 18px;
113124
}
114125
}
115126
#vs .vs-core .vs-slogan .vs-slogan-title strong {
116-
color: #ffae29;
117-
font-weight: 600;
127+
color: #48a0ff;
128+
font-weight: 400;
118129
}
119130
#vs .vs-core .vs-button {
120131
color: #fff;
121132
padding: 7px 10px;
122-
border-radius: 4px;
123-
background: linear-gradient(to left, #e61b60, #dd4a4c);
124133
font-weight: 600;
125134
white-space: nowrap;
126135
margin-right: 18px;
127136
margin-left: 16px;
128137
font-family: 'Archivo', sans-serif;
138+
object-fit: contain;
139+
border-radius: 30px;
140+
border-style: solid;
141+
border-width: 2px;
142+
background-image: linear-gradient(255deg, #d457d0 98%, #ed81eb 2%), linear-gradient(to bottom, #b349b0, #db61d9);
143+
text-transform: uppercase;
144+
border-color: #B349B0;
145+
display: none;
129146
}
130147
@media (min-width: 680px) {
131148
#vs .vs-core .vs-button {
149+
display: inline-block;
132150
margin-right: 0;
133151
padding: 8px 24px;
134152
margin-left: 22px;

β€Ždocs/.vitepress/theme/Layout.vueβ€Ž

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<template>
2-
<div class="main-container">
3-
<BannerTop v-if="showTopBanner" @close="closeBannerTop" />
2+
<div
3+
class="main-container"
4+
:class="{ 'has-top-banner': showTopBanner }"
5+
>
6+
<BannerTop
7+
v-if="showTopBanner"
8+
@close="closeBannerTop"
9+
/>
410
<ParentLayout>
511
<template #sidebar-top>
612
<div class="sponsors sponsors-top">
@@ -52,14 +58,27 @@ import { defineAsyncComponent } from 'vue'
5258
import DefaultTheme from 'vitepress/dist/client/theme-default'
5359
import sponsors from '../components/sponsors.json'
5460
61+
const BannerTop = defineAsyncComponent(() => import('../components/VueSchool/BannerTop.vue'))
62+
5563
export default {
5664
name: 'Layout',
5765
components: {
58-
ParentLayout: DefaultTheme.Layout
66+
ParentLayout: DefaultTheme.Layout,
67+
BannerTop
5968
},
6069
data() {
6170
return {
62-
sponsors
71+
sponsors,
72+
showTopBanner: false
73+
}
74+
},
75+
mounted () {
76+
this.showTopBanner = !localStorage.getItem('VS_FW_22')
77+
},
78+
methods: {
79+
closeBannerTop () {
80+
this.showTopBanner = false
81+
localStorage.setItem('VS_FW_22', 1)
6382
}
6483
}
6584
}

β€Ždocs/public/images/vueschool/extended.svgβ€Ž

Lines changed: 0 additions & 6 deletions
This file was deleted.
-4.44 KB
Binary file not shown.
-5.29 KB
Binary file not shown.
-3.4 KB
Binary file not shown.
-4.28 KB
Binary file not shown.
-3.63 KB
Binary file not shown.

0 commit comments

Comments
Β (0)