Skip to content

Instantly share code, notes, and snippets.

@iso100
iso100 / statamic13
Created November 21, 2012 00:38
Statamic 1.3 changes
# On branch official-1.3
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: public_html/_add-ons/redactor/css/redactor.css
# modified: public_html/_add-ons/redactor/ft.redactor.php
# modified: public_html/_add-ons/redactor/hooks.redactor.php
# modified: public_html/_add-ons/redactor/js/fullscreen.js
# modified: public_html/_add-ons/redactor/js/redactor.min.js
@iso100
iso100 / ga-link-tracking.js
Created November 16, 2012 19:49
Track outbound links as events in GA
@iso100
iso100 / PillResize.html
Created November 13, 2012 13:47
Sizing Images based on P&T Pill Settings
{exp:stash:set name="blocks" parse="inward"}
{ov_blocks}
<div class="block{switch="| even"} size-{block_image_size}" id="block-{row_count}">
<div class="img">{exp:ce_img:single src="{block_image}" width="{block_image_size}" max_width="{block_image_size}" quality="72" alt="size:{block_image_size}"}</div>
{if block_headline}<h2>{block_headline}</h2>{/if}
{if block_content}{block_content}{/if}
</div>
{/ov_blocks}
{/exp:stash:set}
{exp:ce_img:pair
src="{block_image}"
width="{if '{block_image_size}'=='large'}293{if:elseif '{block_image_size}'=='small'}137{if:else}215{/if}"
max_width="{if '{block_image_size}'=='large'}293{if:elseif '{block_image_size}'=='small'}137{if:else}215{/if}"
quality="72"
}
<img src="{made}" width="{width}" height="{height}">
{/exp:ce_img:pair}
@iso100
iso100 / XHR-Mega-Menu.html
Created November 8, 2012 18:27
XHR-loaded megamenu content
HTML Markup:
<ul id="primary-nav" role="navigation">
<li id="nav_home" class="current"><a href="homepage.html">Home</a></li>
<li id="nav_products" class="hasMenu"><a href="overview.html">Products</a><div class="megamenu get-remote-content" data-remote-url="/nav_products.html" style="display:none"></div></li>
<li id="nav_shop"><a href="#">Shop</a></li>
</ul>
Script (requires jQuery):
@iso100
iso100 / block-x-ray-nocompass.scss
Created November 4, 2012 20:37
Conditionally shades block level elements (No Compass)
$show-blocks: true; // Show Block Shading
// Shades all block level elements if show-blocks is true
@if $show-blocks == true {
address, article, aside, blockquote,
center, dd, details, dir, div, dl,
dt, fieldset, figcaption, figure,
footer, form, frameset, h1, h2, h3,
h4, h5, h6, header, hgroup, hr,
isindex, menu, nav, noframes,
@iso100
iso100 / block-x-ray.scss
Created November 4, 2012 15:09 — forked from anonymous/block-x-ray.scss
Conditionally shades block level elements (Compass)
$show-blocks: true; // Show Block Shading
// Shades all block level elements if show-blocks is true
// Requires Compass
@if $show-blocks == true {
#{elements-of-type(block)}{
background: rgba(0,0,0,0.2);
}
}
@iso100
iso100 / scss-grid.scss
Created October 30, 2012 20:10
SCSS For Grids
// Grid related variables
// 995px by 26 columns
$gw-column: 20px;
$gw-gutter: 19px;
$grid-image: '/assets/images/content_images/995px-26col-20w-19gut.png';
// Grid span columns
@mixin span-columns($span: $columns) {
@iso100
iso100 / ZFA_low-warning
Created October 22, 2012 13:01
Error Message after Installing Zoo Flexible Admin
I get this error after installing Zoo Flexible Admin:
A PHP Error was encountered
Severity: Warning
Message: Parameter 1 to Low_variables_ext::sessions_end() expected to be a reference, value given
Filename: libraries/Extensions.php
Line Number: 241
followed by the usual "can't modify headers" message.
@iso100
iso100 / ga-link-tracking.js
Created October 7, 2012 13:03
jQuery for Tracking Outbound Links in GA