Skip to content

Vue School Free Weekend Banner #3737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/.vuepress/public/images/vueschool/extended.svg

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
219 changes: 219 additions & 0 deletions docs/.vuepress/public/images/vueschool/vs-fw-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/.vuepress/public/images/vueschool/vs-iso.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/.vuepress/public/images/vueschool/vs-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

This file was deleted.

This file was deleted.

24 changes: 21 additions & 3 deletions docs/.vuepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<template>
<div class="main-container">
<div
class="main-container"
:class="{ 'has-top-banner': showTopBanner }"
>
<BannerTop
v-if="showTopBanner"
@close="closeBannerTop"
/>
<ParentLayout>
<template #page-top>
<CarbonAds
Expand Down Expand Up @@ -74,11 +81,22 @@ export default {
components: {
ParentLayout,
CarbonAds,
BuySellAds
BuySellAds,
BannerTop: () => import('./components/VueSchool/BannerTop.vue')
},
data() {
return {
sponsors
sponsors,
showTopBanner: false
}
},
mounted () {
this.showTopBanner = !localStorage.getItem('VS_FW_22_BANNER_CLOSED')
},
methods: {
closeBannerTop () {
this.showTopBanner = false
localStorage.setItem('VS_FW_22_BANNER_CLOSED', 1)
}
}
}
Expand Down
131 changes: 0 additions & 131 deletions docs/.vuepress/theme/components/VueSchool/BannerCoins.vue

This file was deleted.

102 changes: 61 additions & 41 deletions docs/.vuepress/theme/components/VueSchool/BannerTop.vue
Original file line number Diff line number Diff line change
@@ -1,39 +1,33 @@
<template>
<a id="vs" href="https://vueschool.io/sales/blackfriday?friend=vuerouter" target="_blank" rel="noreferrer">
<BannerCoins />
<a
id="vs"
href="https://vueschool.io/free-weekend?friend=vuerouter"
target="_blank"
rel="noreferrer"
>
<div class="vs-logo">
<img src="/images/vueschool/vs-iso.svg" class="logo-small">
<img src="/images/vueschool/vs-logo.svg" class="logo-big">
</div>
<div class="vs-core">
<div class="vs-logo">
<img src="/images/vueschool/vueschool_blackfriday_logo.svg">
</div>
<div class="vs-slogan">
<div class="vs-slogan-subtitle">
Access to all Vue Courses at Vue School
VUE 3 MASTERCLASS - FREE WEEKEND
</div>
<div class="vs-slogan-title">
Cyber Monday <strong>35% OFF</strong> - Closes Soon
Register at <strong>vueschool.io/free-weekend</strong>
</div>
</div>
<div class="vs-button">
Get Discount
Free Access
</div>
<img class="vs-tag" src="/images/vueschool/extended.svg" alt="Extended">
</div>
<div id="vs-close" class="vs-close" @click.stop.prevent="$emit('close')">
<img src="/images/vueschool/vueschool_close.svg" alt="Close">
<img src="/images/vueschool/vs-close.svg" alt="Close">
</div>
</a>
</template>

<script>
import BannerCoins from './BannerCoins.vue'

export default {
components: {
BannerCoins
}
}
</script>

<style lang="stylus">
$topBannerHeight ?= 5rem
$topBannerHeightMobile ?= 5rem
Expand All @@ -59,67 +53,93 @@ $contentClass = '.theme-default-content'
z-index: 100
line-height: 1
height: $topBannerHeightMobile
background-image: url(/images/vueschool/vueschool_banner_mobile.png)
background-image: url(/images/vueschool/vs-fw-bg.svg)
background-size: cover
background-repeat: no-repeat
@media (min-width: 680px)
background-image: none
height: $topBannerHeight
justify-content: center

&:hover
.vs-core
.vs-button
background: linear-gradient(261deg, #e61463 100%, #db5248 3%)
border-color: #e61463

.vs-logo {
position: absolute
left: 20px
top: 20px

.logo-small {
display: none
@media (min-width: 680px) {
display: inline-block
}
@media (min-width: 1024px) {
display: none
}
}

.logo-big {
display: none
@media (min-width: 1024px) {
display: inline-block
}
}
}

.vs-core
display: none
@media (min-width: 680px)
display: flex
align-items: center
display: flex
align-items: center

.vs-slogan
font-family: Archivo
color: #FFF
margin-left: 8px
text-align: center
@media (min-width: 680px)
margin-left: 24px
.vs-slogan-subtitle
font-size: 12px
font-size: 14px
color: #47b785
font-weight: bold
@media (min-width: 680px)
font-size: 14px
font-size: 19px
.vs-slogan-title
margin-top: 6px
font-size: 16px
font-weight: 600
font-weight: 400
@media (min-width: 680px)
font-size: 18px
strong
color: #ffae29
font-weight: 600
color: #48a0ff
font-weight: 400

.vs-button
color: #FFF
color: #fff
padding: 7px 10px
border-radius: 4px
background: linear-gradient(to left, #e61b60, #dd4a4c)
font-weight: 600
font-family: 'Archivo', sans-serif
white-space: nowrap
margin-right: 22px
margin-right: 18px
margin-left: 16px
font-family: 'Archivo', sans-serif
object-fit: contain
border-radius: 30px
border-style: solid
border-width: 2px
background-image: linear-gradient(255deg, #d457d0 98%, #ed81eb 2%), linear-gradient(to bottom, #b349b0, #db61d9)
text-transform: uppercase
border-color: #B349B0
display: none
@media (min-width: 680px)
display: inline-block
margin-right: 0
padding: 8px 24px
margin-left: 22px
@media (min-width: 1024px)
margin-left: 69px

.vs-tag
margin-left: 10px
@media (min-width: 1024px)
margin-left: 30px

.vs-close
right: 6px
position: absolute
Expand Down