Skip to content

Instantly share code, notes, and snippets.

View howardpanton's full-sized avatar

Howard Panton howardpanton

View GitHub Profile
@howardpanton
howardpanton / grid-blocks-three.html
Created May 9, 2013 10:14
Grid Block Three Up - HTML
<div class="row">
<ul class="blocks d-all">
<li>
<div class="media-block region three-up heading-top">
<h2 class="media-heading-top">
Media Heading
</h2>
<a href="#" title="Link title">
<figure>
<img src="http://placehold.it/403x304" alt="Image Alt">
@howardpanton
howardpanton / grid-blocks-two.html
Last active December 17, 2015 03:49
Grid Blocks Two Up - HTML
div class="row">
<ul class="blocks d-all">
<li>
<div class="media-block region d1-d6 heading-top">
<h2 class="media-heading-top">
Media Heading
</h2>
<a href="#" title="Link title">
<figure>
<img src="http://placehold.it/423x304" alt="Image Alt">
@howardpanton
howardpanton / grid-blocks-four.html
Last active December 17, 2015 03:49
Grid Block Four Up - HTML
<ul class="blocks four-up">
<li>
<div class="media-block region heading-bottom">
<figure>
<a href="#" title="Link title">
<img src="http://placehold.it/210x210" alt="Image Alt">
</a>
</figure>
<div class="media-body">
<h4 class="media-heading-bottom">Course tutor: Valerie Mace</h4>
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
@howardpanton
howardpanton / breadcrumb
Created January 11, 2013 12:35
PHP breadcrumbs
function breadcrumbs($separator = ' &raquo; ', $home = 'Home') {
$path = array_filter(explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));
$base = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';
$breadcrumbs = Array("<a href=\"$base\">$home</a>");
foreach ($path AS $x => $crumb) {
$title = ucwords(str_replace(Array('.php', '_', '-'), Array('', ' ', ' '), $crumb));
$breadcrumbs[] = "<a href=\"$base$crumb\">$title</a>";
$base = $base.$crumb.'/';
}
return implode($separator, $breadcrumbs);
@howardpanton
howardpanton / browser hacks
Created January 9, 2013 14:31
Browser hacks
/***** Selector Hacks ******/
/* IE6 and below */
* html #uno { color: red }
/* IE7 */
*:first-child+html #dos { color: red }
/* IE7, FF, Saf, Opera */
@howardpanton
howardpanton / README.md
Created December 1, 2012 21:03 — forked from necolas/README.md
Experimenting with component-based HTML/CSS naming and patterns

Template Components

Used to provide structural templates.

Pattern

t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
@howardpanton
howardpanton / gist:2991093
Created June 25, 2012 20:42 — forked from thehydroimpulse/gist:2872907
A Laravel task generator. Models, Migrations and Controllers.
<?php
/**
* @copyright 2012 TheHydroImpulse, Daniel Fagnan
* @version 0.1
* @todo Add an overwite ability. Among other things.
* @note Use this as you wish. Extend it, Mash it. Enjoy it.
*/
<h1>Testing PHP Tabs</h1>
<?php
$links = array();
$texts = array();
// Add items to array
<t4 type="navigation" id="627"/>
@howardpanton
howardpanton / gist:2084309
Created March 18, 2012 23:08 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(