Skip to content

Instantly share code, notes, and snippets.

View zachharkey's full-sized avatar

Zach Harkey zachharkey

  • Harkey Design
  • Deep South
View GitHub Profile
@zachharkey
zachharkey / template.php
Created March 10, 2010 05:43
Return a themed breadcrumb trail (Drupal 6)
<?php
/**
* Return a themed breadcrumb trail.
*
* @param $breadcrumb
* An array containing the breadcrumb links.
* @return a string containing the breadcrumb output.
*/
function themename_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
var currentpath = location.pathname;
$('.block a[@href="' + currentpath + '"]').parent().addClass('current');
@zachharkey
zachharkey / CSS3 Fade Effect.html
Created November 15, 2011 22:50
CSS3 Fade Effect
<!-- [JSFiddle](http://jsfiddle.net/zachharkey/nyDR3/1/) -->
<style type="text/css" media="screen">
a.box-link {
text-decoration: none;
padding: 5px 10px;
-webkit-transition-property: background;
-webkit-transition-duration: 300ms;
@zachharkey
zachharkey / CSSToggle.py
Created February 12, 2012 03:05
SublimeText2 Module Toggle CSS format between single and multiline
import sublime, sublime_plugin, re
DEBUG_ENABLED = False
PRINT_CONTEXT = False
# Toggle between single-line or multi-line formatted css statement
#
# Add the following line to Preferences > Key Bindings - User
# { "keys": ["ctrl+shift+j"], "command": "toggle_single_line_css" }
#
@zachharkey
zachharkey / html.tpl.php
Created February 29, 2012 02:46 — forked from pascalduez/html.tpl.php
Drupal 7 — HTML5 html.tpl.php
<!DOCTYPE html>
<html<?php print $html_attributes; ?>>
<head>
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $scripts; ?>
</head>
<body<?php print $body_attributes;?>>
@zachharkey
zachharkey / gist:1998997
Created March 8, 2012 05:51
HTML Starter Template
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Sample Title</title>
</head>
<body>
@zachharkey
zachharkey / template.php
Created May 9, 2012 00:58
Add block_class classes to panel pane markup
<?php
/**
* Modify panels pane template variables
*/
function MYTHEME_preprocess_panels_pane(&$variables) {
// Merge block_class classes into the pane's $classes_array
if (module_exists('block_class')) {
// Insert additional classes into panels panes.
if ($variables['pane']->type == 'block') {
// Infer the block's $module and $delta from the pane subtype.
@zachharkey
zachharkey / _shared.scss
Created June 1, 2012 03:26 — forked from rickharris/_shared.scss
Media queries with IE support using Sass 3.2 features
// Using this structure, this file should be your canonical stylesheet where
// everything would be imported into, so that you can just `@import "shared";`
// in both your normal and IE stylesheets, only having to add libraries and
// such in one place.
// These styles are just a contrived example.
body {
font-size: 18px;
@include respond-to(desktops) {
color: blue;
@zachharkey
zachharkey / _responsive-cols.scss
Created June 5, 2012 21:21
Responsive Panels Markup
.responsive-cols,
.responsive-cols-1,
.responsive-cols-2,
.responsive-cols-3,
.responsive-cols-4 {
margin:0;padding:0;
@include no-bullets;
.col {
@include trailer(1);
<h1>CSS3 Checkbox Styles</h1>
<!-- Slide ONE -->
<div class="slideOne">
<input type="checkbox" value="None" id="slideOne" name="check" />
<label for="slideOne"></label>
</div>
<!-- Slide TWO -->
<div class="slideTwo">