Skip to content

Instantly share code, notes, and snippets.

iso100

Block or report user

Report or block iso100

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@PunchRockgroin
PunchRockgroin / modalCloseOutside
Created Jan 12, 2014
Gumby close modal on click outside
View modalCloseOutside
$('.modal').on(Gumby.click, function(e){
var container = $('.content');
if((!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).length === 0)) // ... nor a descendant of the container
{
$('.modal .close').trigger('gumby.trigger');
}
});
@pmeissner
pmeissner / gist:6328273
Created Aug 24, 2013
statamic opengraph
View gist:6328273
{{ if segment_2 == slug }}
<meta property="og:title" content="{{ title }}">
<meta property="og:type" content="article">
<meta property="og:description" content="{{ content|striptags|truncate:200 }}">
<meta property="og:url" content="{{ permalink }}">
<meta property="og:image" content="{{ _site_url }}{{ transform src='{{ featured_image }}' width='1200' height='600' action='smart' }}">
<meta property="og:site_name" content="{{ _site_name }}">
<meta property="fb:admins" content="722169618">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@pmeissner">
View Conditional Secondary Nav with Structure
{if structure:child_ids != '' OR structure:top:entry_id != {structure:page:entry_id}}
<div id="secondary-nav" class="widget">
<h3>Other Pages in <a href="{structure:top:uri}">{structure:top:title}</a>:</h3>
{exp:structure:nav
current_class="active"
start_from="/{segment_1}"
include_ul="yes"
}
</div>
{/if}
View ie8-grid-foundation-4.css
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@croxton
croxton / gist:3810681
Created Oct 1, 2012
Better Workflow > Assets integration
View gist:3810681
In ft.assets.php add this to the top of the pre_process function:
/**
* Pre Process
*/
function pre_process()
{
// -------------------------------------------
// Get the exp_assets_entries rows
// -------------------------------------------
@ckimrie
ckimrie / .htaccess
Created Nov 10, 2011
ExpressionEngine index.php removal with Google Analytics Compatibility
View .htaccess
#################################################################################
#
# - ExpressionEngine index.php ModRewrite Removal -
# compatible with Google Analytics Tracking
#
##################################################################################
RewriteEngine on
@kevinthompson
kevinthompson / .htaccess
Created Jan 27, 2011
ExpressionEngine Rewrite Rules
View .htaccess
<IfModule mod_rewrite.c>
# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
RewriteBase /
# Redirect index.php Requests
# ------------------------------
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
@mrw
mrw / ExpressionEngine 2 Multi-Database Setup.php
Created Nov 1, 2010
Inside config/database.php: Use a switch statement and the active group in EE2 to set database information based on which server you're currently accessing.
View ExpressionEngine 2 Multi-Database Setup.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Multiple if statements, or a switch statement,
// can handle as many environments as you need
if ($_SERVER['HTTP_HOST'] == "local-site.dev") {
$active_group = 'expressionengine';
} else {
$active_group = 'enginehosting';
}
You can’t perform that action at this time.