Skip to content

Add Vue School Black Friday 21 banners #2908

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 2 commits into from
Nov 18, 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
4 changes: 2 additions & 2 deletions themes/vue/layout/layout.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% var isIndex = page.path === 'index.html' %>
<% var isThemes = page.path === 'resources/themes.html' %>
<% var hasVueSchoolBanner = false %>
<% var hasVueSchoolBanner = true %>

<!DOCTYPE html>
<html lang="en" class="with-v3-banner">
Expand Down Expand Up @@ -55,7 +55,7 @@
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link href="https://maxcdn.bootstrapcdn.com" rel="preconnect" crossorigin>

<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Archivo:400,600|Roboto Mono&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Dosis:500&text=Vue.js&display=swap" rel="stylesheet">

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
Expand Down
42 changes: 31 additions & 11 deletions themes/vue/layout/partials/vueschool_banner.ejs
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
<a id="vs" class="vs-hidden" href="https://vueschool.io/sales/summer-vue?friend=vuejs" target="_blank" rel="noreferrer">
<div class="vs-iso">
<img src="/images/banners/vs-iso.svg">
</div>
<div class="vs-logo">
<img src="/images/banners/vs-logo.svg">
<%

const coins = [
{ id: 'js', direction: 'left' },
{ id: 'ts', direction: 'right' },
{ id: 'vue', direction: 'left' },
{ id: 'vuex', direction: 'left' },
{ id: 'nuxt', direction: 'right' }
]

%>

<a id="vs" class="vs-hidden" href="https://vueschool.io/sales/blackfriday?friend=vuejs" target="_blank" rel="noreferrer">
<div class="vs-blackfriday-coins">
<% for (let i = 0; i < coins.length; i++) { %>
<% const coin = coins[i] %>
<img
alt="<%- coin.id %>"
src="<%- `/images/banners/tech-coin-${coin.id}.png` %>"
class="<%- ['vs-blackfriday-coin', coin.id, coin.direction].join(' ') %>">
<% } %>
</div>
<div class="vs-core">
<div class="vs-backpack">
<img src="/images/banners/vs-backpack.png" alt="Backpack">
<div class="vs-logo">
<img src="/images/banners/vueschool_blackfriday_logo.svg">
</div>
<div class="vs-slogan">
Less than <span class="vs-slogan-light">48 hours</span> left for the Vue School offer
<div class="vs-slogan-subtitle">
Access to all Vue Courses at Vue School
</div>
<div class="vs-slogan-title">
Black Friday <strong>40% OFF</strong>
</div>
</div>
<div class="vs-button">
GET ACCESS
Get Discount
</div>
</div>
<div id="vs-close" class="vs-close">
<img src="/images/banners/close.svg" alt="Close">
<img src="/images/banners/vueschool_close.svg" alt="Close">
</div>
</a>
176 changes: 115 additions & 61 deletions themes/vue/source/css/_vueschool.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "_settings"
$mobile-bar-height = 40px
$vs-banner-height-desktop = 80px
$vs-banner-height-mobile = 50px
$vs-banner-height-mobile = 80px
$menu-height = 63px

body.has-vs-banner
Expand Down Expand Up @@ -49,11 +49,11 @@ body.has-vs-banner
top: 160px

#vs
font-family "Roboto", sans-serif
font-family "Archivo", sans-serif
z-index: 8
box-sizing: border-box
color: #FFF
background: #202A5A
background-color: #000c19
display: flex
align-items: center
position: fixed
Expand All @@ -66,86 +66,140 @@ body.has-vs-banner
justify-content: center
min-height: $vs-banner-height-desktop
@media (min-width: 900px)
position: static
position: relative
background-image: none

&.vs-hidden
display: none

&: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
background: linear-gradient(261deg, #e61463 100%, #db5248 3%);

.vs-core
display: flex
align-items: center

.vs-backpack
margin-right: 14px
img
height: 50px
@media (min-width: 680px)
height: 74px

.vs-slogan
font-family: Archivo
color: #FFF
font-weight: bold
font-size: 14px
width: 150px
text-align: center
margin-left: 40px
@media (min-width: 400px)
margin-left: 60px
margin-left: 8px
@media (min-width: 680px)
margin-left: 0
width: auto
text-align: left
font-size: 18px
> .vs-slogan-light
color: #ff5338
text-align: left
@media (min-width: 900px)
text-align: center
display: inline
margin-left: 24px
.vs-slogan-subtitle
font-size: 12px
@media (min-width: 680px)
font-size: 14px
.vs-slogan-title
margin-top: 6px
font-size: 16px
font-weight: 600
@media (min-width: 680px)
font-size: 18px
strong
color: #ffae29
font-weight: 600

.vs-button
margin-left: 43px
margin-left: 16px
color: #FFF
padding: 13px 24px
border-radius: 40px
display: none
background: #ff5338
font-weight: bold
padding: 7px 10px
border-radius: 4px
background: linear-gradient(to left, #e61b60, #dd4a4c)
font-weight: 600
white-space: nowrap
margin-right: 30px
@media (min-width: 680px)
margin-right: 0
padding: 8px 24px
margin-left: 32px
@media (min-width: 680px)
display: inline-block
margin-left: 69px

.vs-close
right: 10px
right: 6px
position: absolute
padding: 10px
@media (min-width: 680px)
right: 10px
padding: 10px
right: 20px
&:hover
color: #56D8FF
color: #56D8FF

.vs-blackfriday-coins {
overflow: hidden;
position: absolute;
bottom: 0;
right: 0;
top: 0;
left: 0;
z-index: 0;
}

.vs-blackfriday-coin {
display: none;
}

@media (min-width: 768px) {
.vs-blackfriday-coins {
background-image: url(/images/banners/vueschool_blackfriday_background_tablet.svg);
background-position: center;
background-size: cover;
}
}

@media (min-width: 1024px) {
.vs-blackfriday-coins {
background: transparent;
}

#vs:hover .vs-blackfriday-coin.left {
transform: translateX(-600px);
transition: transform 30s linear;
}

#vs:hover .vs-blackfriday-coin.right {
transform: translateX(600px);
transition: transform 30s linear;
}

.vs-blackfriday-coin {
display: inline-block;
position: absolute;
transition: transform 5s linear;
transform: translateX(0);
}

.vs-blackfriday-coin.js {
width: 43px;
top: 32px;
left: calc(50% - 341px);
}

.vs-blackfriday-coin.ts {
top: 0;
left: 0;
width: 54px;
left: calc(50% + 457px);
}

.vs-blackfriday-coin.vue {
top: 18px;
width: 60px;
left: calc(50% + 586px);
}

.vs-blackfriday-coin.vuex {
top: 23px;
left: 0;
width: 56px;
left: calc(50% - 620px);
}

.vs-blackfriday-coin.nuxt {
top: 10px;
width: 48px;
left: calc(50% - 474px);
}
}
1 change: 1 addition & 0 deletions themes/vue/source/css/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
@import "_sponsors-index"
@import "_modal"
@import "_themes"
@import "_vueschool.styl"

$width = 900px
$space = 40px
Expand Down
1 change: 1 addition & 0 deletions themes/vue/source/css/page.styl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
@import "_scrimba"
@import "_vue-mastery"
@import "_themes"
@import "_vueschool.styl"

#header
box-shadow: 0 0 1px rgba(0,0,0,.25)
Expand Down
Binary file added themes/vue/source/images/banners/tech-coin-js.png
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading