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
gulp css |
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
var gulp = require('gulp'); | |
var postcss = require('gulp-postcss'); | |
gulp.task('css', function () { | |
var plugins = [ | |
]; | |
return gulp.src('./src/*.css') | |
.pipe(postcss(plugins)) | |
.pipe(gulp.dest('./dest')); | |
}); |
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
npm install --save-dev gulp-postcss |
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
.fullscreen-bg { | |
position: fixed; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
overflow: hidden; | |
z-index: -100; | |
} |
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
// Change page title on blur | |
$(window).blur(function() { | |
$("title").text("Don't forget to read this..." + pageTitle); | |
}); |
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
$(function() { | |
// Get page title | |
var pageTitle = $("title").text(); | |
// Change page title on blur | |
$(window).blur(function() { | |
$("title").text("Don't forget to read this..."); | |
}); | |
// Change page title back on focus |
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
( function() { | |
/* Variables */ | |
var videoPlayer = document.getElementById( 'video-player' ), | |
video = videoPlayer.getElementsByClassName( 'fullscreen-bg__video' )[0], | |
playlist = videoPlayer.getElementsByClassName( 'fullscreen-bg__playlist' )[0], | |
source = video.getElementsByTagName( 'source' ), | |
linkList = [], | |
videoDirectory = 'video/', | |
currentVideo = 0, | |
allLinks = playlist.children, |
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
.fullscreen-bg__playlist { | |
display: none; | |
} |
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
<div class="fullscreen-bg__playlist"> | |
<a href="video/BLUE_DOTS.mp4" class="current-video"></a> | |
<a href="video/ORANGE_DOTS.mp4"></a> | |
<a href="video/RED_DOTS.mp4"></a> | |
</div> |
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
<div id="video-player" class="fullscreen-bg"> |