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
/* | |
Description: | |
A utility class that shims the default native Fullscreen API implementations | |
in JavaScript (for the browser). Does nothing if FullScreen is not available | |
due to browser support / client browser configuration. | |
Usage: | |
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
/* | |
Note: handy class to extend when you want a dead simple hook cycle system for anything you'll want to make | |
triggerable. | |
usage: | |
const Hookable = require('./path/to/Hookable...'); | |
class SomeClass extends Hookable { | |
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
/* | |
SVGLoader 0.1 | |
* dependencies: jQuery | |
- finds all occurences of any HTML element containing `[data-svg-src]` | |
- tries to load that svg | |
- if sucessfull, injects that svg code after the placeholder | |
- if unsuccessfull, handles that with caution and allows a custom callback | |
for when it's very wishable to handle that error on the frontend (such as |
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
/* | |
In favor of casper.js (regressive UI testing): a very tiny and hacky fix | |
to get around the flexbox issues... Idea is to have this class put on the body | |
when we're running phantomjs. | |
@NOTE: There is only a class on the body 'body.casper-env' that is allowed to | |
make changes to minimize complexity. | |
@NOTE: Only apply the casper-env fix when it's needed in the test env. ofcourse | |
we still need (AND SHOULD) test without making any modifcations. This fix |
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 plugin for dynamically loading pages | |
$("#pageHolder").loadPage({ | |
file: 'index.html', | |
effect: 'slide|fade', | |
duration: 1000 | |
}).then(function() { | |
// done loading, this = $(html) | |
}, function(error) { |
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
/* | |
SASS Class helpers | |
to make these work, include them in some imported file (like variables.scss or mixins.scss) and | |
extend them on classes like so: | |
ul { | |
@extend %reset-list; | |
} |
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
/* | |
defines base colors, all colors to use are described in this map. | |
works pretty well with a color palette generator like http://coolors.co/ | |
palette in this example: https://coolors.co/def200-242038-315659-e3efeb-028090 | |
MAP ui-colors ( | |
[STRING] color-name: [HEX] hex-value | |
) | |
*/ |
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
/* | |
@description A function that takes in some headers as a string containing newlines. | |
It will split the string on its newlines, and then will split it into | |
a key-value pair for easy deploying into HTML. | |
@param headerStr [String] | |
@returns headers [Array] | |
*/ | |
function parseHeaderString(headerStr) { |
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 utilities | |
* Takes in a form element and rips out all the values in a simple key-value pair | |
*/ | |
$(function() { | |
$.fn.parseFormFields = function(props) { | |
// define some default settings with default values |
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
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] | |
|| window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) |