-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add VueSchool Summer Sale banner #1082
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
<template> | ||
<a id="vs" href="https://vueschool.io/sales/summer-vue?friend=vuejs" target="_blank" rel="noreferrer"> | ||
<div class="vs-iso"> | ||
<img src="/images/vueschool/vs-iso.svg"> | ||
</div> | ||
<div class="vs-logo"> | ||
<img src="/images/vueschool/vs-logo.svg"> | ||
</div> | ||
<div class="vs-core"> | ||
<div class="vs-backpack"> | ||
<img src="/images/vueschool/vs-backpack.png" alt="Backpack"> | ||
</div> | ||
<div class="vs-slogan"> | ||
3-months Vue School for only $49 <span style="text-decoration: line-through">$75</span>! | ||
<span class="vs-slogan-light"> | ||
Limited Time Offer | ||
</span> | ||
</div> | ||
<div class="vs-button"> | ||
GET ACCESS | ||
</div> | ||
</div> | ||
<div | ||
id="vs-close" | ||
class="vs-close" | ||
@click.stop.prevent="$emit('close')"> | ||
<img src="/images/vueschool/close.svg" alt="Close"> | ||
</div> | ||
</a> | ||
</template> | ||
|
||
<style lang="stylus"> | ||
@require '../styles/config' | ||
$topBannerHeight ?= 5rem | ||
$topBannerHeightMobile ?= 3.125rem | ||
|
||
// Banner | ||
#vs | ||
align-items: center | ||
background-color: #202A5A | ||
box-sizing: border-box | ||
color: #fff | ||
display: none | ||
font-family 'Inter', Roboto, Oxygen, Fira Sans, Helvetica Neue, sans-serif | ||
justify-content: center | ||
position: fixed | ||
padding: 0 10px | ||
left: 0 | ||
right: 0 | ||
top: 0 | ||
z-index: 100 | ||
height: $topBannerHeightMobile | ||
@media (min-width: 680px) | ||
height: $topBannerHeight | ||
&:hover | ||
.vs-core | ||
.vs-button | ||
background: #f22606 | ||
|
||
.vs-iso | ||
display: none | ||
position: absolute | ||
left: 20px | ||
height: 26px | ||
img | ||
height: 26px | ||
@media (min-width: 680px) | ||
display: inline-block | ||
height: 40px | ||
img | ||
height: 40px | ||
@media (min-width: 900px) | ||
display: none | ||
|
||
.vs-logo | ||
position: absolute | ||
display: none | ||
left: 40px | ||
@media (min-width: 900px) | ||
display: block | ||
|
||
.vs-core | ||
display: flex | ||
align-items: center | ||
|
||
.vs-backpack | ||
margin-right: 6px | ||
@media (min-width: 680px) | ||
margin-right: 14px | ||
img | ||
height: 50px | ||
@media (min-width: 680px) | ||
height: 74px | ||
|
||
.vs-slogan | ||
color: #FFF | ||
font-weight: bold | ||
font-size: 14px | ||
margin-right: 26px | ||
@media (min-width: 680px) | ||
margin-right: 0 | ||
font-size: 18px | ||
> .vs-slogan-light | ||
color: #ff5338 | ||
display: block | ||
text-align: left | ||
@media (min-width: 900px) | ||
text-align: center | ||
display: inline | ||
|
||
.vs-button | ||
margin-left: 43px | ||
color: #FFF | ||
padding: 13px 24px | ||
border-radius: 40px | ||
display: none | ||
background: #ff5338 | ||
font-weight: bold | ||
@media (min-width: 680px) | ||
display: inline-block | ||
|
||
.vs-close | ||
right: 10px | ||
position: absolute | ||
padding: 10px | ||
@media (min-width: 680px) | ||
right: 20px | ||
&:hover | ||
color: #56D8FF | ||
|
||
/************************************/ | ||
|
||
// Show banner only if the container has class "has-top-banner" | ||
.theme-container.has-top-banner | ||
#vs | ||
display: flex | ||
|
||
// Add margin top to body, navbar and sidebar | ||
.theme-container.has-top-banner | ||
margin-top: $topBannerHeightMobile | ||
.navbar | ||
margin-top: $topBannerHeightMobile | ||
.sidebar | ||
margin-top: $topBannerHeightMobile | ||
@media (min-width: 680px) | ||
.theme-container.has-top-banner | ||
margin-top: $topBannerHeight | ||
.navbar | ||
margin-top: $topBannerHeight | ||
.sidebar | ||
margin-top: $topBannerHeight | ||
|
||
// Adjust titles margin and padding for anchor links | ||
.theme-container.has-top-banner | ||
{$contentClass}:not(.custom) | ||
h1, h2, h3, h4, h5, h6 | ||
margin-top (0.5rem - $topBannerHeight - $navbarHeight) | ||
padding-top ($navbarHeight + $topBannerHeight + 1rem) | ||
@media (min-width: 680px) | ||
.theme-container.has-top-banner | ||
{$contentClass}:not(.custom) | ||
h1, h2, h3, h4, h5, h6 | ||
margin-top (0.5rem - $topBannerHeightMobile - $navbarHeight) | ||
padding-top ($navbarHeight + $topBannerHeightMobile + 1rem) | ||
</style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a blocker but it might be nice to have a check against
Date.now()
here too, so that the banner automatically disappears when the offer is over.I'm primarily thinking about the translation repos, which are often a bit behind the main docs and can end up showing these banners for a long time after the offer has finished.