Skip to content

Instantly share code, notes, and snippets.

// This alternative version creates the delays based on an easing curve.
// Nice, but needs some tweaking. See here: http://sol.gfxile.net/interpolation/
$('.js-transitionDelays').each(function(){
var items = $(this).find('> li > a');
var total = items.length;
items.each(function(i) {
var multiplier = i/total;
var speedFactor = 0.39;
@thisisjamessmith
thisisjamessmith / gulpfile.js
Created July 25, 2018 08:48
Gulpfile for static sites
var gulp = require('gulp');
// --------------------------------------------
// ENVIRONMENT VARS
// --------------------------------------------
var localHost = 'example.test';
var compiledFolder = 'public_html/assets';
var srcFolder = 'src';
var tmplFolder = 'public_html';
@thisisjamessmith
thisisjamessmith / Intermediate Stash + ExpressionEngine
Last active April 15, 2019 19:01
Intermediate Stash templating with ExpressionEngine to reuse the same markup for different types of listing. See related article for discussion of this template: http://www.jamessmith.co.uk/articles/expressionengine-stash-tutorial-level-2
{exp:switchee variable="{segment_2}" parse="inward"}
{!-- ====================================
FETCH DATA for various GAME LISTINGS
(categories, publishers, designers, all, search, alphalist).
The markup is assembled at the end of this template.
The crazy-looking regex: #^P(\d+)$# simply matches pagination segments ("P" plus any digits).
Then this one #^(\d+)$# looks for date archives (any digits)