View inViewport.js
import * as app from '../../app';
/**
* Determine if an element is in the viewport
*
* @access public
*
* @param {Object} custom - where custom options are passed
*/
export function inViewport(custom) {
View carousel.js
View parallax.js
const win = document.querySelector('.homepage_wrapper');
win.addEventListener('scroll', () => {
const scroll = win.scrollTop;
$(function() {
const element = document.querySelector('.homepage_section-cards');
if (app.inViewport({container: win, target: element})) {
View if.js
const scope = () => {
if (point === 'top') {
return elemTop;
}
else if (point === 'middle') {
return elemTop + (elemHeight/2);
}
else if (point === 'bottom') {
return elemTop + elemHeight;
}
View es6modal.js
import * as app from '../../../app';
import defaults from './modals.json';
/**
* Modal
*
* @access public
*
* @param {(String|Object)} els
* @param {Object} custom
View node-sass-sample.js
var sass = require('node-sass');
sass.render({
file: scss_filename,
[, options..]
}, function(err, result) { /*...*/ });
// OR
var result = sass.renderSync({
data: scss_content
[, options..]
});
View sass.js
// Requirements
var sass = require('node-sass');
var fs = require('fs');
var mkdirp = require('mkdirp');
var getDirName = require('path').dirname;
function compileSass(options = {}) {
// set default options
options = Object.assign({
style: 'expanded'
View _map-search.scss
/// Map Search
/// Get the first occurance of a key from a nested map
///
/// @author [@esr360](http://twitter.com/esr360)
///
/// @access public
/// @group Tools
///
/// @param {map} $map - the map you would like to search
/// @param {string} $target-key - the key you are searching for
View SassMeister-input.scss
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
/*-----------------------------------------------------------------
Modular
Made by @esr360
http://github.com/esr360/Modular/