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
const _ = require('lodash'); | |
const getFilesFromDir = require('./getFilesFromDir.js'); | |
const fs = require('fs'); | |
module.exports = fileTocGenerator; | |
function getMarkdownStack(obj, stack = [], lvl = 0) { | |
const filesObj = obj.files; | |
if (filesObj) { | |
for (var property in filesObj) { |
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
// ======================================== | |
// ===== Collections (Maps and Lists) ===== | |
// ======================================== | |
// ------------------------------------------------ | |
// Create and return a new list between a start and end point within provided list | |
// | |
// @param {List} $list - List to slice |
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($, window, document, undefined){ | |
$.fn.carousel = function(options) { | |
return this.each(function() { | |
if (!$(this).data('carousel')) { | |
$(this).data('carousel', new Carousel(this, options)); | |
} | |
}); | |
}; | |
function Carousel(element, options) { |
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($, window, document, namespace){ | |
var modalData = 'modal'; | |
$.fn.modal = function(options) { | |
return this.each(function() { | |
if (!$(this).data(modalData)) { | |
$(this).data(modalData, new Modal(this, options)); | |
} | |
}); | |
}; |
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 easterEgg ($, namespace) { | |
function EasterEgg (options) { | |
var defaults = { | |
timeout : 2000, // Time you have to enter a new key before the keysPressed array gets flushed | |
logKeys : false, // Console log the keys that you are pressing. Helps to determine combos. | |
combos : [] // [[keys], callback] - Add the combos from the start here. OR, add them with a returned function after the fact | |
}; |
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 keycombo ($, namespace) { | |
function KeyCombo () { | |
var eventNamespace, // Unique namespace so that keypressing can be unbound | |
keysPressed = [], // Dynamically populates with key codes as they are actviely pressed | |
combos = []; // [[keys], callback] | |
var $document = $(document); | |
// Private Functions | |
//////////////////// |
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
// ------------------------------------------------ | |
// Creating % Based Columns. | |
// | |
// @param {Map} $breakpoints - Mapping of breakpoint to # of columns | |
// @param {Number} $breakpoint-override - When mixin is included within a breakpoint | |
// @param {Number} $gutter - Provies spacing between the columns | |
// | |
// @requires Must be included on the parent of the 'columns'. | |
// 'columns' is dependent on breakpoint() ** https://gist.github.com/tommycoppers/06f71cf07686836395b9 |
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
// ========================================== | |
// ================== Grid ================== | |
// ========================================== | |
// --- Introduction --- | |
// | |
// Sass generated, semantic, percent-based grid system, so you don't have to! | |
// This Sass Partial takes in the configurable settings and will create a grid framework without redundant code. | |
// The naming conventions follow the BEM CSS pattern. | |
// Control the width of the Column by a modifier class, configured into a reduced fraction. |
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
// pubsub - https://github.com/cowboy/jquery-tiny-pubsub | |
;(function($) { | |
var o = $({}); | |
$.subscribe = function() { | |
o.on.apply(o, arguments); | |
}; | |
$.unsubscribe = function() { | |
o.off.apply(o, arguments); | |
}; |
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
// ================================================== | |
// =================== Breakpoints ================== | |
// ================================================== | |
// | |
// --- Introduction --- | |
// | |
// Media Queries, namely Breakpoints, are key in responsive design / development. | |
// "breakpoint" allows for a robust approach to rapid development of Media Queries in your CSS. | |
// By defining a list of approved breakpoints, this library helps to ensure consistent Media Query output, relative to each project. | |
// In addition to defined breakpoints, you are allowed to pass in numbers of measure ( width of screen ) to fine tune one-off cases. |