Skip to content

Instantly share code, notes, and snippets.

<!-- content to be placed inside <body>…</body> -->
@guizmo
guizmo / snag-list.js
Created May 24, 2012 02:49
Snag list message
/*
** first add custom body class in function.php (page slug/name)
** see code in body-class.php snippet
*/
/*
** Then map the messages to the appended body class
*/
var todo = {
@guizmo
guizmo / Asset.js
Created May 22, 2012 00:08
Next and Prev Counter
$("#prev").click(function(){
count--;
if(count < 0) count = $("li .tpl").length - 1;
$("li .tpl")[count].click();
});
$("#next").click(function(){
count++;
if(count > $("li .tpl").length - 1) count = 0;
@guizmo
guizmo / alias-path.php
Created April 20, 2012 00:20
Get alias path in views
$pathAlias = drupal_lookup_path('alias',"node/".$row->nid);
@guizmo
guizmo / media-queries-boilerplate.css
Created April 5, 2012 20:24
Media queries Boilerplate
/*Smartphones (portrait and landscape) ———– */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ———– */
@media only screen
and (min-width : 321px) {
@guizmo
guizmo / animate.css
Created April 5, 2012 20:23
animations width and height
.main{
width:800px;
display:inline-block;
}
.sidebar{
width:300px;
display:inline-block;
}
@guizmo
guizmo / hide-text.css
Created April 1, 2012 06:58
Image replacement
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
display: block;
}
@guizmo
guizmo / font-stack.css
Created March 27, 2012 09:01
Font stack
body {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
}
@guizmo
guizmo / hide-text.css
Created March 19, 2012 05:45
Image replacement
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@guizmo
guizmo / gist:2052246
Created March 16, 2012 19:58 — 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(