Skip to content

Instantly share code, notes, and snippets.

View moonbeetle's full-sized avatar

Joris Heyndrickx moonbeetle

View GitHub Profile
@moonbeetle
moonbeetle / typeplate-pull-quote.html
Last active December 25, 2015 04:29
Typeplate pull quotes test
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
@moonbeetle
moonbeetle / 0_reuse_code.js
Created October 9, 2013 13:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@moonbeetle
moonbeetle / IE8-polyfills
Created August 29, 2013 06:07
IE8 cloud hosted polyfills
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
<script src="//s3.amazonaws.com/nwapi/nwmatcher/nwmatcher-1.2.5-min.js"></script>
<script src="//html5base.googlecode.com/svn-history/r38/trunk/js/selectivizr-1.0.3b.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script>
<![endif]-->
<!--
For some unknown reason no CDN seems to be offering css3-mediaqueries.js which you can grab here:
http://code.google.com/p/css3-mediaqueries-js/
@moonbeetle
moonbeetle / EE_ChannelRatings_Stash
Created January 25, 2013 23:52
EE + Channel Rating + Stash: Using Stash to pass entry_id's for top rated channel entries in another channel entries loop
In the template: (beware of whitespace!!)
{exp:stash:set parse_tags="yes" output="no" save="yes" type="snippet"}
{stash:recipe_entry_ids}
{exp:channel_ratings:top_entries channel="recipes" limit="3" backspace="1"}{rating:entry_id}|{/exp:channel_ratings:top_entries}
{/stash:recipe_entry_ids}
{/exp:stash:set}
Then in the wrapper embed...
@moonbeetle
moonbeetle / ee_stash_zurb_block-grids.txt
Created May 24, 2012 14:42
EE-Stash-ZURBFoundation-block-grid-images
{!--
Conditionally output up to three images in a Foundation block-grid
Assumptions:
* Channel "Pages" (pages)
* Custom field "cf_page_images"
* Addons : P&T Assets, Croxton's Stash, Switchee
* Assets field set to allow multiple images
* Template uses ZURB Foundation framework
* Limit is set to three images, but ZURB Foundation block-grids go up till five
--}
@moonbeetle
moonbeetle / ee_stash_example
Created May 24, 2012 09:08
Stash example (ExpressionEngine)
{!-- PART 1 : Put the code below in the beginning of your template --}
{exp:stash:set parse_tags="yes" replace="no" refresh="1440"}
{!-- Stashing Channel Entries data example --}
{!-- (use as many custom fields form the channel as you need) --}
{exp:channel:entries channel="ENTERCHANNENAMEHERE" limit="1" disable="member_data|pagination|categories"}
{stash:page_title}{title}{/stash:page_title}
{/exp:channel:entries}
{!-- Stashing a custom value example --}
@moonbeetle
moonbeetle / ee_stash_edimageresizer
Created April 23, 2012 12:54
Using a Stash variable in ED ImageResizer, wrapped by a Stash conditional
/* Assumes you SET the necessary Stash variables FIRST, then in your template output them like so: */
{!-- Recipe of the week --}
<h3>{gv_recipeoftheweek_{ln}}</h3>
{if {exp:stash:not_empty name='recipe_img' type='variable'}}
<a href="{title_permalink='recipes/detail'}" class="thumbframe">
{exp:ed_imageresizer image="{exp:stash:get name='recipe_img'}" maxWidth="128" cropratio="1:1" alt="{exp:stash:get name='recipe_title'}" parse="inward"}
</a>
{/if}
<a href="{title_permalink='recipes/detail'}"><h4>{exp:stash:get name='recipe_title'}</h4></a>