Skip to content

Instantly share code, notes, and snippets.

View d4tocchini's full-sized avatar

Dan Tocchini IV d4tocchini

View GitHub Profile
@d4tocchini
d4tocchini / pages.coffee
Created August 6, 2011 05:04
RW.Pages API
$ = jQuery
# Wrap in Closure to avoid global variables.
$ ->
RW.Pages = new RW.p.PageCollection()
RW.Pages.add [
{
id: 'home'
pageLevel: 0
$ = jQuery
# Wrap in Closure to avoid global variables.
$ ->
###
ICanHaz.js version 0.9 -- by @HenrikJoreteg
More info at: http://icanhazjs.com
#8b d88 88
$ = jQuery
# Wrap in Closure to avoid global variables.
$ ->
RW.Pages = new RW.p.PageCollection()
new RW.Page
id: 'home'
@d4tocchini
d4tocchini / harmonize.coffee
Created August 20, 2011 05:20
jQueryML plugin factory
$.plugins.add
name: 'harmonize'
api:
itemClass: 'harmonized'
itemSelector: null
properties: ['width', 'height', 'class'] # 'class', 'attr', 'plugin', css atributes
units: [80, 50, 'harmony']
harmonies:
[
[[12,12]]
@d4tocchini
d4tocchini / GDOM.coffee
Created August 24, 2011 04:36
JQML Responsive Grid API demo
GDOM:
nodes:
id: 'mainGrid'
$: {nodeLayout:{type:'float', options:''}, css:{margin:''} }
nodes:
[
{
id: 'title',
$: {width:'100%', height:G.v(5)}
}
@d4tocchini
d4tocchini / api-01.coffee
Created August 26, 2011 03:56
Grid API tests
# intialize a grid on '.mainGrid' with default options using G's subclass of jQuery
G.$('.superCoolGrid').grid({id:'super'})
# now that the grid has been initialized you can access it via G[id]:
alert 'this is the grid ' + G.super
# configure a grid's dimensions to have 12 fluid columns and a vertical baseline grid of 1.6em's
@d4tocchini
d4tocchini / GridAPITest.coffee
Created September 13, 2011 08:08
Grid API tests 2
$(window).responsive
queries:
[
{
query: (el) ->
if $(el).width() > 960 then return true else return false
response: (el) ->
$('.G_main_grid')
.css
@d4tocchini
d4tocchini / G.coffee
Created September 15, 2011 02:33
G.coffee
###
One grid system to rule them all, and in the javascript bind them
Concerns
=====================================
- IE positioning... see isotope.js and https://github.com/louisremi/jquery.transform.js#
- needs to be absolue in relative? or absolute in absolute too?
@d4tocchini
d4tocchini / template.coffee
Created October 25, 2011 08:54
template.coffee
$ = jQuery
$ ->
$(window).responsive
queries:
[
#1600
if: (el) ->
return $(el).width() > 1600
@d4tocchini
d4tocchini / gist:1415097
Created December 1, 2011 08:48
icnos.coffee
$.templates.add([
{
name:'btn_gear'
template:
'''
<div class="iconBtn iconBtn_gear circle50 vBox boxPackCenter boxAlignCenter">
{{>icon_gear}}
</div>
'''
} {