8000 Add Vue School Black Friday 21 banners by nicodevs · Pull Request #2908 · vuejs/v2.vuejs.org · GitHub
[go: up one dir, main page]

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 1 commit
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
Prev Previous commit
Update Black Friday Vue School banner
  • Loading branch information
nicodevs committed Nov 16, 2021
commit d66b7bc959f0e6cb58cfcd15e0c12ca94749a2e3
21 changes: 21 additions & 0 deletions themes/vue/layout/partials/vueschool_banner.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<%

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-logo">
<img src="/images/banners/vueschool_blackfriday_logo.svg">
Expand Down
84 changes: 80 additions & 4 deletions themes/vue/source/css/_vueschool.styl
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ body.has-vs-banner
@media (min-width: 680px)
justify-content: center
min-height: $vs-banner-height-desktop
background-image: url(/images/banners/vueschool_blackfriday_background_tablet.svg)
@media (min-width: 900px)
position: static
background-image: url(/images/banners/vueschool_blackfriday_background_desktop.svg)
position: relative
background-image: none

&.vs-hidden
display: none
Expand Down Expand Up @@ -126,4 +125,81 @@ body.has-vs-banner
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);
}
}
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 can CFC3 not 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 was deleted.

0