- Front Page/News (news pulls from Home Page category on posts)
- Campaign
- Campaign
- ...
- Work Grid
- All
- Work Detail
- Work Detail
- ...
- All
This file contains 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
// if not currently loading AND page has teaser AND page is scrolled to teaser area | |
var teaserHeight = 250; | |
if ( !jt2016.loadingPost && jQuery('.teaser').length && (jQuery('.teaser').offset().top < jt2016.sTop + jQuery(window).height() - teaserHeight) ) { | |
// get url from teaser element | |
var url = jQuery('.teaser').data('url'); | |
// make new promise | |
jt2016.loadingPost = jQuery.ajax(url, {dataType: 'html'}).promise().done(function(data){ |
This file contains 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
// Make sure that iframe resizes correctly on fullscreen exit | |
// (ie, make Vimeo or YouTube videos return to the iFrame bounds on fullscreen exit) | |
var isFullscreen = false; | |
var videoSizer = null; | |
function onFullscreenToggle(){ | |
var isFullscreen = document.fullscreenElement || | |
document.webkitFullscreenElement || | |
document.mozFullScreenElement || |
This file contains 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
jQuery('SELECTOR').each(function(i) { | |
setTimeout(function() { | |
// ADD CALLBACK HERE | |
}.bind(this), i * 100); | |
}); |
This file contains 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 windowHeight = jQuery(window).height(); | |
var docHeight = jQuery(document).height(); | |
var scrollTop = jQuery(window).scrollTop(); | |
var trackLength = docHeight - windowHeight; | |
var amountScrolled = scrollTop / trackLength || 0; |
This file contains 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
https://drive.google.com/open?id=0B6nljQYu8gAsRlYxNDhZb3pFekE - individual | |
https://drive.google.com/open?id=0B6nljQYu8gAsNHFsTjI3R0Y1R28 - folder |
This file contains 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
// Given `container`, find dimensions of `content`. Mimic either CSS background-position `contain` or `cover`. | |
// Both `container` and `content` must have height and width attributes. | |
// aspect ratio > 1: image is portrait | |
// aspect ratio < 1: image is landscape | |
const contain = ( contents, container ) => { | |
// thanks to http://stackoverflow.com/questions/27939971/difference-between-background-sizecover-and-background-sizecontain |
Favorites:
(newest to oldest)
- Giant Spoon (WIP)
- Code Study: Raymarching (writeup)
- CTHDRL
- The first, second, and third children of the front page will become the top left, bottom left, and portrait right images on the front page (just below the hero).
- The three latest posts with the "Front Page" category will be rendered on the front page.
- The first child of any given work grid will be rendered in the featured spot for that work grid.
OlderNewer