Skip to content

docs: Add Vue School BTS banner #3636

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
Sep 23, 2021
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
7 changes: 7 additions & 0 deletions docs/.vuepress/public/images/vueschool/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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-iso.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 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.
16 changes: 15 additions & 1 deletion docs/.vuepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
class="main-container"
:class="{ 'has-top-banner': showTopBanner }"
>
<BannerTop
v-if="showTopBanner"
@close="closeBannerTop"
/>
<ParentLayout>
<template #page-top>
<CarbonAds
Expand Down Expand Up @@ -55,13 +59,23 @@ export default {
components: {
ParentLayout,
CarbonAds,
BuySellAds
BuySellAds,
BannerTop: () => import('./components/BannerTop.vue')
},
data () {
return {
sponsors,
showTopBanner: false
}
},
mounted () {
this.showTopBanner = !localStorage.getItem('VS_BTS_BANNER_CLOSED')
},
methods: {
closeBannerTop () {
this.showTopBanner = false
localStorage.setItem('VS_BTS_BANNER_CLOSED', 1)
}
}
}
</script>
Expand Down
14 changes: 9 additions & 5 deletions docs/.vuepress/theme/components/BannerTop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<img src="/images/vueschool/vs-backpack.png" alt="Backpack">
</div>
<div class="vs-slogan">
Extended! <span class="vs-slogan-light">Last few hours</span> for the Vue School offer
3-months Vue School for only $49 <span style="text-decoration: line-through; opacity: 0.5;">$75</span>!
<span class="vs-slogan-light">
Limited Time Offer
</span>
</div>
<div class="vs-button">
GET ACCESS
Expand Down Expand Up @@ -90,7 +93,9 @@ $contentClass = '.theme-default-content'
.vs-backpack
margin-right: 6px
@media (min-width: 680px)
margin-right: 2px
display: none
@media (min-width: 900px)
display: inline-block
img
height: 50px
@media (min-width: 680px)
Expand All @@ -101,12 +106,10 @@ $contentClass = '.theme-default-content'
font-weight: bold
font-size: 14px
text-align: center
padding: 0 60px
@media (min-width: 680px)
padding: 0
text-align: left
margin-right: 26px
margin-right: 0
margin-left: 12px
font-size: 18px
> .vs-slogan-light
color: #ff5338
Expand All @@ -124,6 +127,7 @@ $contentClass = '.theme-default-content'
background: #ff5338
font-weight: bold
@media (min-width: 680px)
margin-left: 18px
display: inline-block

.vs-close
Expand Down