Skip to content

Commit 9a3c7ec

Browse files
authoredApr 8, 2022
Vue School Free Weekend Banner (#3737)
1 parent fb73db2 commit 9a3c7ec

16 files changed

+324
-388
lines changed
 

‎docs/.vuepress/public/images/vueschool/extended.svg

-6
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

‎docs/.vuepress/public/images/vueschool/vs-fw-bg.svg

+219
Loading
Loading
Loading
Binary file not shown.

‎docs/.vuepress/public/images/vueschool/vueschool_blackfriday_background_tablet_2.svg

-200
This file was deleted.

‎docs/.vuepress/public/images/vueschool/vueschool_blackfriday_logo.svg

-7
This file was deleted.

‎docs/.vuepress/theme/Layout.vue

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<template>
2-
<div class="main-container">
2+
<div
3+
class="main-container"
4+
:class="{ 'has-top-banner': showTopBanner }"
5+
>
6+
<BannerTop
7+
v-if="showTopBanner"
8+
@close="closeBannerTop"
9+
/>
310
<ParentLayout>
411
<template #page-top>
512
<CarbonAds
@@ -74,11 +81,22 @@ export default {
7481
components: {
7582
ParentLayout,
7683
CarbonAds,
77-
BuySellAds
84+
BuySellAds,
85+
BannerTop: () => import('./components/VueSchool/BannerTop.vue')
7886
},
7987
data() {
8088
return {
81-
sponsors
89+
sponsors,
90+
showTopBanner: false
91+
}
92+
},
93+
mounted () {
94+
this.showTopBanner = !localStorage.getItem('VS_FW_22_BANNER_CLOSED')
95+
},
96+
methods: {
97+
closeBannerTop () {
98+
this.showTopBanner = false
99+
localStorage.setItem('VS_FW_22_BANNER_CLOSED', 1)
82100
}
83101
}
84102
}

‎docs/.vuepress/theme/components/VueSchool/BannerCoins.vue

-131
This file was deleted.

‎docs/.vuepress/theme/components/VueSchool/BannerTop.vue

+61-41
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,33 @@
11
<template>
2-
<a id="vs" href="https://vueschool.io/sales/blackfriday?friend=vuerouter" target="_blank" rel="noreferrer">
3-
<BannerCoins />
2+
<a
3+
id="vs"
4+
href="https://vueschool.io/free-weekend?friend=vuerouter"
5+
target="_blank"
6+
rel="noreferrer"
7+
>
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>
412
<div class="vs-core">
5-
<div class="vs-logo">
6-
<img src="/images/vueschool/vueschool_blackfriday_logo.svg">
7-
</div>
813
<div class="vs-slogan">
914
<div class="vs-slogan-subtitle">
10-
Access to all Vue Courses at Vue School
15+
VUE 3 MASTERCLASS - FREE WEEKEND
1116
</div>
1217
<div class="vs-slogan-title">
13-
Cyber Monday <strong>35% OFF</strong> - Closes Soon
18+
Register at <strong>vueschool.io/free-weekend</strong>
1419
</div>
1520
</div>
1621
<div class="vs-button">
17-
Get Discount
22+
Free Access
1823
</div>
19-
<img class="vs-tag" src="/images/vueschool/extended.svg" alt="Extended">
2024
</div>
2125
<div id="vs-close" class="vs-close" @click.stop.prevent="$emit('close')">
22-
<img src="/images/vueschool/vueschool_close.svg" alt="Close">
26+
<img src="/images/vueschool/vs-close.svg" alt="Close">
2327
</div>
2428
</a>
2529
</template>
2630

27-
<script>
28-
import BannerCoins from './BannerCoins.vue'
29-
30-
export default {
31-
components: {
32-
BannerCoins
33-
}
34-
}
35-
</script>
36-
3731
<style lang="stylus">
3832
$topBannerHeight ?= 5rem
3933
$topBannerHeightMobile ?= 5rem
@@ -59,67 +53,93 @@ $contentClass = '.theme-default-content'
5953
z-index: 100
6054
line-height: 1
6155
height: $topBannerHeightMobile
62-
background-image: url(/images/vueschool/vueschool_banner_mobile.png)
56+
background-image: url(/images/vueschool/vs-fw-bg.svg)
6357
background-size: cover
6458
background-repeat: no-repeat
6559
@media (min-width: 680px)
66-
background-image: none
6760
height: $topBannerHeight
6861
justify-content: center
6962
7063
&:hover
7164
.vs-core
7265
.vs-button
7366
background: linear-gradient(261deg, #e61463 100%, #db5248 3%)
67+
border-color: #e61463
68+
69+
.vs-logo {
70+
position: absolute
71+
left: 20px
72+
top: 20px
73+
74+
.logo-small {
75+
display: none
76+
@media (min-width: 680px) {
77+
display: inline-block
78+
}
79+
@media (min-width: 1024px) {
80+
display: none
81+
}
82+
}
83+
84+
.logo-big {
85+
display: none
86+
@media (min-width: 1024px) {
87+
display: inline-block
88+
}
89+
}
90+
}
7491
7592
.vs-core
76-
display: none
77-
@media (min-width: 680px)
78-
display: flex
79-
align-items: center
93+
display: flex
94+
align-items: center
8095
8196
.vs-slogan
8297
font-family: Archivo
8398
color: #FFF
8499
margin-left: 8px
100+
text-align: center
85101
@media (min-width: 680px)
86102
margin-left: 24px
87103
.vs-slogan-subtitle
88-
font-size: 12px
104+
font-size: 14px
105+
color: #47b785
106+
font-weight: bold
89107
@media (min-width: 680px)
90-
font-size: 14px
108+
font-size: 19px
91109
.vs-slogan-title
92110
margin-top: 6px
93111
font-size: 16px
94-
font-weight: 600
112+
font-weight: 400
95113
@media (min-width: 680px)
96114
font-size: 18px
97115
strong
98-
color: #ffae29
99-
font-weight: 600
116+
color: #48a0ff
117+
font-weight: 400
100118
101119
.vs-button
102-
color: #FFF
120+
color: #fff
103121
padding: 7px 10px
104-
border-radius: 4px
105-
background: linear-gradient(to left, #e61b60, #dd4a4c)
106122
font-weight: 600
107-
font-family: 'Archivo', sans-serif
108123
white-space: nowrap
109-
margin-right: 22px
124+
margin-right: 18px
110125
margin-left: 16px
126+
font-family: 'Archivo', sans-serif
127+
object-fit: contain
128+
border-radius: 30px
129+
border-style: solid
130+
border-width: 2px
131+
background-image: linear-gradient(255deg, #d457d0 98%, #ed81eb 2%), linear-gradient(to bottom, #b349b0, #db61d9)
132+
text-transform: uppercase
133+
border-color: #B349B0
134+
display: none
111135
@media (min-width: 680px)
136+
display: inline-block
112137
margin-right: 0
113138
padding: 8px 24px
114139
margin-left: 22px
115140
@media (min-width: 1024px)
116141
margin-left: 69px
117142
118-
.vs-tag
119-
margin-left: 10px
120-
@media (min-width: 1024px)
121-
margin-left: 30px
122-
123143
.vs-close
124144
right: 6px
125145
position: absolute

0 commit comments

Comments
 (0)
Please sign in to comment.