Skip to content

Instantly share code, notes, and snippets.

Avatar

thisisjamessmith

View GitHub Profile
View dynamicTransitionDelaysWithEasing.js
// 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 Jul 25, 2018
Gulpfile for static sites
View gulpfile.js
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 Apr 15, 2019
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
View Intermediate Stash + ExpressionEngine
{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)
You can’t perform that action at this time.