Add intro video

This commit is contained in:
Jeremy Thomas 2017-10-11 17:25:33 +01:00
parent 512b97cf53
commit 1210e65f83
8 changed files with 1832 additions and 583 deletions

View File

@ -111,6 +111,7 @@
<script src="{{ site.url }}/lib/main.js"></script> <script src="{{ site.url }}/lib/main.js"></script>
{% if page.route == 'index' %} {% if page.route == 'index' %}
<script src="https://player.vimeo.com/api/player.js"></script>
<script type="text/javascript" src="{{ site.url }}/lib/index.js"></script> <script type="text/javascript" src="{{ site.url }}/lib/index.js"></script>
{% endif %} {% endif %}

File diff suppressed because one or more lines are too long

View File

@ -2,11 +2,13 @@ document.addEventListener('DOMContentLoaded', () => {
// Intro // Intro
const introVimeo = document.getElementById('introVimeo'); const introVideo = document.getElementById('introVideo');
const introIframe = document.getElementById('introIframe');
const introPlayer = new Vimeo.Player(introIframe);
const npmClipboard = new Clipboard('#npmCopy'); const npmClipboard = new Clipboard('#npmCopy');
introVimeo.addEventListener('load', () => { introPlayer.ready().then(function() {
introVimeo.parentNode.parentNode.classList.add('has-loaded'); introVideo.classList.add('has-loaded');
}); });
npmClipboard.on('success', function(e) { npmClipboard.on('success', function(e) {

View File

@ -11,6 +11,8 @@
.intro-ghbtns .intro-ghbtns
height: 30px height: 30px
margin-bottom: 24px
// margin-bottom: 46px
.intro-npm .intro-npm
background: $black-ter background: $black-ter
@ -79,7 +81,7 @@
.intro-spinner, .intro-spinner,
.intro-shadow .intro-shadow
animation-duration: 1000ms animation-duration: 500ms
animation-easing-function: ease-out animation-easing-function: ease-out
animation-fill-mode: both animation-fill-mode: both
transform-origin: center transform-origin: center
@ -107,8 +109,7 @@
.intro-shadow .intro-shadow
+overlay +overlay
background-color: #43647b background-color: #776e70
background-image: url("/images/index/vimeo-placeholder.jpg")
background-position: center center background-position: center center
background-repeat: no-repeat background-repeat: no-repeat
background-size: cover background-size: cover
@ -118,6 +119,7 @@
.intro-iframe .intro-iframe
opacity: 0 opacity: 0
padding-top: 52.8125% padding-top: 52.8125%
// padding-top: 56.25%
position: relative position: relative
transition-duration: 500ms transition-duration: 500ms
transition-property: opacity transition-property: opacity
@ -128,6 +130,21 @@
top: 0 top: 0
width: 100% width: 100%
.intro-author
color: $text-light
font-size: $size-small
margin-top: 1rem
text-align: center
a
color: $text-strong
&:hover
text-decoration: underline
span
opacity: 0.5
transition: 100ms opacity
&:hover
opacity: 1
+mobile +mobile
.intro-buttons .intro-buttons
.button .button

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -4,11 +4,13 @@ document.addEventListener('DOMContentLoaded', function () {
// Intro // Intro
var introVimeo = document.getElementById('introVimeo'); var introVideo = document.getElementById('introVideo');
var introIframe = document.getElementById('introIframe');
var introPlayer = new Vimeo.Player(introIframe);
var npmClipboard = new Clipboard('#npmCopy'); var npmClipboard = new Clipboard('#npmCopy');
introVimeo.addEventListener('load', function () { introPlayer.ready().then(function () {
introVimeo.parentNode.parentNode.classList.add('has-loaded'); introVideo.classList.add('has-loaded');
}); });
npmClipboard.on('success', function (e) { npmClipboard.on('success', function (e) {