Skip to content

Commit 8d600d6

Browse files
authored
docs: Add Vue School BTS banner (#3636)
1 parent e4fe767 commit 8d600d6

File tree

6 files changed

+60
-6
lines changed

6 files changed

+60
-6
lines changed

Diff for: docs/.vuepress/public/images/vueschool/close.svg

+7
Loading
6.09 KB
Loading

Diff for: docs/.vuepress/public/images/vueschool/vs-iso.svg

+13
Loading

Diff for: docs/.vuepress/public/images/vueschool/vs-logo.svg

+16
Loading

Diff for: docs/.vuepress/theme/Layout.vue

+15-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
class="main-container"
44
:class="{ 'has-top-banner': showTopBanner }"
55
>
6+
<BannerTop
7+
v-if="showTopBanner"
8+
@close="closeBannerTop"
9+
/>
610
<ParentLayout>
711
<template #page-top>
812
<CarbonAds
@@ -55,13 +59,23 @@ export default {
5559
components: {
5660
ParentLayout,
5761
CarbonAds,
58-
BuySellAds
62+
BuySellAds,
63+
BannerTop: () => import('./components/BannerTop.vue')
5964
},
6065
data () {
6166
return {
6267
sponsors,
6368
showTopBanner: false
6469
}
70+
},
71+
mounted () {
72+
this.showTopBanner = !localStorage.getItem('VS_BTS_BANNER_CLOSED')
73+
},
74+
methods: {
75+
closeBannerTop () {
76+
this.showTopBanner = false
77+
localStorage.setItem('VS_BTS_BANNER_CLOSED', 1)
78+
}
6579
}
6680
}
6781
</script>

Diff for: docs/.vuepress/theme/components/BannerTop.vue

+9-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
<img src="/images/vueschool/vs-backpack.png" alt="Backpack">
1212
</div>
1313
<div class="vs-slogan">
14-
Extended! <span class="vs-slogan-light">Last few hours</span> for the Vue School offer
14+
3-months Vue School for only $49 <span style="text-decoration: line-through; opacity: 0.5;">$75</span>!
15+
<span class="vs-slogan-light">
16+
Limited Time Offer
17+
</span>
1518
</div>
1619
<div class="vs-button">
1720
GET ACCESS
@@ -90,7 +93,9 @@ $contentClass = '.theme-default-content'
9093
.vs-backpack
9194
margin-right: 6px
9295
@media (min-width: 680px)
93-
margin-right: 2px
96+
display: none
97+
@media (min-width: 900px)
98+
display: inline-block
9499
img
95100
height: 50px
96101
@media (min-width: 680px)
@@ -101,12 +106,10 @@ $contentClass = '.theme-default-content'
101106
font-weight: bold
102107
font-size: 14px
103108
text-align: center
104-
padding: 0 60px
105109
@media (min-width: 680px)
106110
padding: 0
107111
text-align: left
108-
margin-right: 26px
109-
margin-right: 0
112+
margin-left: 12px
110113
font-size: 18px
111114
> .vs-slogan-light
112115
color: #ff5338
@@ -124,6 +127,7 @@ $contentClass = '.theme-default-content'
124127
background: #ff5338
125128
font-weight: bold
126129
@media (min-width: 680px)
130+
margin-left: 18px
127131
display: inline-block
128132
129133
.vs-close

0 commit comments

Comments
 (0)