Skip to content

Commit 85c5f0a

Browse files
authored
docs(docs): Add Vue School Black Friday 21 banners (#3664)
1 parent 1611348 commit 85c5f0a

File tree

9 files changed

+488
-119
lines changed

9 files changed

+488
-119
lines changed
Binary file not shown.

docs/.vuepress/public/images/vueschool/vs-iso.svg

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

docs/.vuepress/public/images/vueschool/vs-logo.svg

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

docs/.vuepress/public/images/vueschool/vueschool_blackfriday_background_desktop.svg

Lines changed: 200 additions & 0 deletions
Loading

docs/.vuepress/public/images/vueschool/vueschool_blackfriday_background_tablet.svg

Lines changed: 200 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading

docs/.vuepress/public/images/vueschool/close.svg renamed to docs/.vuepress/public/images/vueschool/vueschool_close.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/.vuepress/theme/Layout.vue

Lines changed: 21 additions & 3 deletions
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
@@ -64,11 +71,22 @@ export default {
6471
components: {
6572
ParentLayout,
6673
CarbonAds,
67-
BuySellAds
74+
BuySellAds,
75+
BannerTop: () => import('./components/BannerTop.vue')
6876
},
6977
data() {
7078
return {
71-
sponsors
79+
sponsors,
80+
showTopBanner: false
81+
}
82+
},
83+
mounted () {
84+
this.showTopBanner = !localStorage.getItem('VS_BF21_BANNER_CLOSED')
85+
},
86+
methods: {
87+
closeBannerTop () {
88+
this.showTopBanner = false
89+
localStorage.setItem('VS_BF21_BANNER_CLOSED', 1)
7290
}
7391
}
7492
}

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

Lines changed: 59 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,113 @@
11
<template>
2-
<a id="vs" href="https://vueschool.io/sales/back-to-school?friend=vuerouter" target="_blank" rel="noreferrer">
3-
<div class="vs-iso">
4-
<img src="/images/vueschool/vs-iso.svg" alt="Vue School Logo">
5-
</div>
6-
<div class="vs-logo">
7-
<img src="/images/vueschool/vs-logo.svg" alt="Vue School Logo">
8-
</div>
2+
<a id="vs" href="https://vueschool.io/sales/blackfriday?friend=vuerouter" target="_blank" rel="noreferrer">
93
<div class="vs-core">
10-
<div class="vs-backpack">
11-
<img src="/images/vueschool/vs-backpack.png" alt="Backpack">
4+
<div class="vs-logo">
5+
<img src="/images/vueschool/vueschool_blackfriday_logo.svg">
126
</div>
137
<div class="vs-slogan">
14-
Less than <span class="vs-slogan-light">48 hours</span> left for the Vue School offer
8+
<div class="vs-slogan-subtitle">
9+
Access to all Vue Courses at Vue School
10+
</div>
11+
<div class="vs-slogan-title">
12+
Black Friday <strong>40% OFF</strong>
13+
</div>
1514
</div>
1615
<div class="vs-button">
17-
GET ACCESS
16+
Get Discount
1817
</div>
1918
</div>
20-
<div
21-
id="vs-close"
22-
class="vs-close"
23-
@click.stop.prevent="$emit('close')">
24-
<img src="/images/vueschool/close.svg" alt="Close">
19+
<div id="vs-close" class="vs-close" @click.stop.prevent="$emit('close')">
20+
<img src="/images/vueschool/vueschool_close.svg" alt="Close">
2521
</div>
2622
</a>
2723
</template>
2824

2925
<style lang="stylus">
3026
$topBannerHeight ?= 5rem
31-
$topBannerHeightMobile ?= 3.125rem
27+
$topBannerHeightMobile ?= 5rem
3228
$navbarHeight ?= 3.6rem
3329
$contentClass = '.theme-default-content'
3430
35-
@import url('https://fonts.googleapis.com/css?family=Roboto')
31+
@import url('https://fonts.googleapis.com/css?family=Archivo:400,600')
3632
3733
// Banner
3834
#vs
3935
align-items: center
40-
background-color: #202A5A
36+
background-color: #000c19
4137
box-sizing: border-box
4238
color: #fff
4339
display: none
44-
font-family 'Roboto', Oxygen, Fira Sans, Helvetica Neue, sans-serif
40+
font-family 'Inter', Roboto, Oxygen, Fira Sans, Helvetica Neue, sans-serif
4541
justify-content: center
4642
position: fixed
4743
padding: 0 10px
4844
left: 0
4945
right: 0
5046
top: 0
5147
z-index: 100
48+
line-height: 1
5249
height: $topBannerHeightMobile
5350
@media (min-width: 680px)
5451
height: $topBannerHeight
52+
justify-content: center
53+
background-image: url(/images/vueschool/vueschool_blackfriday_background_tablet.svg)
54+
@media (min-width: 900px)
55+
background-image: url(/images/vueschool/vueschool_blackfriday_background_desktop.svg)
56+
5557
&:hover
5658
.vs-core
5759
.vs-button
58-
background: #f22606
59-
60-
.vs-iso
61-
position: absolute
62-
left: 20px
63-
height: 26px
64-
display: none
65-
img
66-
height: 26px
67-
@media (min-width: 680px)
68-
display: block
69-
left: 20px
70-
height: 40px
71-
img
72-
height: 40px
73-
@media (min-width: 900px)
74-
display: none
75-
76-
.vs-logo
77-
position: absolute
78-
display: none
79-
left: 40px
80-
@media (min-width: 900px)
81-
display: block
60+
background: linear-gradient(261deg, #e61463 100%, #db5248 3%)
8261
8362
.vs-core
8463
display: flex
8564
align-items: center
86-
margin-right: 20px
87-
@media (min-width: 680px)
88-
margin-right: 0
89-
90-
.vs-backpack
91-
margin-right: 6px
92-
@media (min-width: 680px)
93-
display: none
94-
@media (min-width: 900px)
95-
display: inline-block
96-
img
97-
height: 50px
98-
@media (min-width: 680px)
99-
height: 74px
10065
10166
.vs-slogan
67+
font-family: Archivo
10268
color: #FFF
103-
font-weight: bold
104-
font-size: 14px
105-
text-align: center
69+
margin-left: 8px
10670
@media (min-width: 680px)
107-
padding: 0
108-
text-align: left
109-
margin-left: 12px
110-
font-size: 18px
111-
> .vs-slogan-light
112-
color: #ff5338
113-
text-align: left
114-
@media (min-width: 900px)
115-
text-align: center
116-
display: inline
71+
margin-left: 24px
72+
.vs-slogan-subtitle
73+
font-size: 12px
74+
@media (min-width: 680px)
75+
font-size: 14px
76+
.vs-slogan-title
77+
margin-top: 6px
78+
font-size: 16px
79+
font-weight: 600
80+
@media (min-width: 680px)
81+
font-size: 18px
82+
strong
83+
color: #ffae29
84+
font-weight: 600
11785
11886
.vs-button
119-
margin-left: 13px
12087
color: #FFF
121-
padding: 13px 24px
122-
border-radius: 40px
123-
display: none
124-
background: #ff5338
125-
font-weight: bold
88+
padding: 7px 10px
89+
border-radius: 4px
90+
background: linear-gradient(to left, #e61b60, #dd4a4c)
91+
font-weight: 600
92+
font-family: 'Archivo', sans-serif
93+
white-space: nowrap
94+
margin-right: 22px
95+
margin-left: 16px
96+
@media (min-width: 680px)
97+
margin-right: 0
98+
padding: 8px 24px
99+
margin-left: 32px
126100
@media (min-width: 680px)
127-
margin-left: 18px
128-
display: inline-block
101+
margin-left: 69px
129102
130103
.vs-close
131-
right: 10px
132-
position: absolute
133-
padding: 10px
134-
@media (min-width: 680px)
135-
right: 20px
136-
&:hover
137-
color: #56D8FF
104+
right: 6px
105+
position: absolute
106+
@media (min-width: 680px)
107+
padding: 10px
108+
right: 20px
109+
&:hover
110+
color: #56D8FF
138111
139112
/************************************/
140113

0 commit comments

Comments
 (0)