Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| const gulp = require('gulp'); | |
| const sourcemaps = require('gulp-sourcemaps'); | |
| const sass = require('gulp-sass'); | |
| const autoprefixer = require('gulp-autoprefixer'); | |
| const cssnano = require('gulp-cssnano'); | |
| const critical = require('critical'); | |
| const imagemin = require('gulp-imagemin'); | |
| const uglify = require('gulp-uglify'); | |
| const changed = require('gulp-changed'); | |
| const plumber = require('gulp-plumber'); |
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
| 10 silly lifecycle alexcarpenter_me@1.0.0~start: Args: [ '-c', 'NODE_ENV=development gulp watch' ] | |
| 11 silly lifecycle alexcarpenter_me@1.0.0~start: Returned: code: 2 signal: null | |
| 12 info lifecycle alexcarpenter_me@1.0.0~start: Failed to exec start script | |
| 13 verbose stack Error: alexcarpenter_me@1.0.0 start: `NODE_ENV=development gulp watch` | |
| 13 verbose stack Exit status 2 | |
| 13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16) | |
| 13 verbose stack at emitTwo (events.js:126:13) | |
| 13 verbose stack at EventEmitter.emit (events.js:214:7) | |
| 13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) | |
| 13 verbose stack at emitTwo (events.js:126:13) |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>CSS Intrinsic Ratios</title> | |
| <style> | |
| body { | |
| max-width: 800px; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Lazy loading images</title> | |
| <style> | |
| body { | |
| max-width: 900px; |
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
| <head> | |
| <script> | |
| if (window.localStorage && window.localStorage._tk_cache) { | |
| document.documentElement.classList.add('wf-active'); | |
| var script = document.createElement('script'); | |
| script.innerHTML = localStorage._tk_cache + ";(function () {var timeout = setTimeout(function () {document.documentElement.classList.remove('wf-active');}, 300); Typekit.load({ async: false, active: function () { clearTimeout(timeout); }});})();"; | |
| document.head.appendChild(script); | |
| } | |
| window._tk_onload = function () { | |
| var req = new XMLHttpRequest() |
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
| import qs from 'qs'; | |
| import Axios from 'axios'; | |
| Axios.defaults.baseURL = Craft.baseUrl; | |
| Axios.defaults.headers.common['Accept'] = 'application/json'; | |
| Axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; | |
| Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; | |
| Axios.interceptors.request.use(config => { | |
| if (config.data === Object(config.data)) { |
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
| {# ================================================================== #} | |
| {# ================================================================== #} | |
| {# Responsive Images | |
| {# ================================================================== #} | |
| {# ================================================================== #} | |
| {# | |
| {% import '_macros/img' as macroImg %} | |
| Macro to centralize the markup and config for responsive images. | |
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
| class Trunkd { | |
| constructor(container, options = {}) { | |
| this.container = container || '.trunkd'; | |
| this.options = { | |
| antecedent: options.antecedent || 'Recommended by:', | |
| consequent: options.consequent || 'others', | |
| seperator: options.seperator || ',' | |
| } | |
| const sum = arr => arr.reduce((a, b) => a + b); |
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
| // array utils | |
| // ================================================================================================= | |
| const combine = (...arrays) => [].concat(...arrays); | |
| const compact = arr => arr.filter(Boolean); | |
| const contains = (() => Array.prototype.includes | |
| ? (arr, value) => arr.includes(value) | |
| : (arr, value) => arr.some(el => el === value) |