Skip to content

Instantly share code, notes, and snippets.

View tjFogarty's full-sized avatar
🇮🇪

T.J. Fogarty tjFogarty

🇮🇪
View GitHub Profile
@tjFogarty
tjFogarty / ext.navee_static_menu.php
Created November 7, 2014 11:23
ext.navee_static_menu.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ExpressionEngine - by EllisLab
*
* @package ExpressionEngine
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2003 - 2011, EllisLab, Inc.
* @license http://expressionengine.com/user_guide/license.html
* @link http://expressionengine.com
@tjFogarty
tjFogarty / search.html
Last active August 29, 2015 14:09
Rivets + Fuse search
<div class="js-course-search">
<input type="search" placeholder="Search courses..." rv-on-keyup="search.update" autofocus>
<ul>
<li rv-each-result="search.results">
<a rv-href="result.url">
{result.name}
</a>
</li>
/* globals $, LoadPartial, Foundation */
/* jshint node:true */
'use strict';
/**
* The Likebox is just above the footer on the homepage
* Load it once it comes into view
*/
var fb = new LoadPartial({
@tjFogarty
tjFogarty / navigation.js
Last active August 29, 2015 14:15
Handle mobile navigation
/*global module, $, _, matchMedia*/
'use strict';
/**
* Navigation
* Disclaimer: This is built with jQuery.mmenu in mind, and so some of the selectors and calls accommodate this
* Shouldn't be too hard to swap this out for a different menu solution
*
* @param config
@tjFogarty
tjFogarty / srcset.html
Created February 25, 2015 09:18
Example of srcset and sizes
<img
srcset="/path/to/slider-image-small.jpg 400w,
/path/to/slider-image-medium.jpg 800w,
/path/to/slider-image-large.jpg 1200w"
sizes="100vw"
alt="...">
@tjFogarty
tjFogarty / Overlay.js
Created April 6, 2015 15:10
Full-screen overlay
/*globals $, TweenLite, Power3*/
/*jshint node:true*/
'use strict';
/**
* Overlay
*
* Controls creating, showing, hiding and removing of overlays
*/
@tjFogarty
tjFogarty / alert.css
Created April 8, 2015 15:03
EE Site info
.c-alert {
position: fixed;
background: #333;
background: rgba(51, 51, 51, 0.7);
bottom: 30px;
color: #fff;
text-align: center;
padding: 15px;
border-radius: 4px;
width: 300px;
@tjFogarty
tjFogarty / overview.php
Created April 16, 2015 08:14
WordPress + Timber example
<?php
/**
* Template Name: Overview
*/
if (!class_exists('Timber')){
echo 'Timber not activated. Make sure you activate the plugin in <a href="/wp-admin/plugins.php#timber">/wp-admin/plugins.php</a>';
return;
}
@tjFogarty
tjFogarty / base.twig
Last active August 29, 2015 14:26
Example base.twig for use with Timber plugin for WordPress
<!doctype html>
<html class="no-js" {{site.language_attributes}}>
<head>
<meta charset="{{site.charset}}">
<title>
{% if wp_title %}
{{ wp_title }} - {{ site.name }}
{% else %}
{{ site.name }}
@tjFogarty
tjFogarty / test-wp-search-form.js
Created August 11, 2015 15:13
Testing WordPress Search Form with CasperJS
/*global casper*/
'use strict';
var config = require('../config'),
page = 'http://' + config.local_url + '/',
formData = {
's': 'suppliers' // search term
};