Skip to content

Instantly share code, notes, and snippets.

View nanchu's full-sized avatar

Nan Chu nanchu

View GitHub Profile
@nanchu
nanchu / layoutdemo.css
Last active December 14, 2015 02:58
2 column layout with same height regardless of content, header + sticky footer
/*css reset*/
html,body {position:relative;margin:0;padding:0;min-height:100%;width:100%;height:100%;}
div,p,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td, figure {margin:0;padding:0;}
ol,ul {list-style:none;}
li {list-style-type: none;}
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }
html, body {
font-family: Helvetica;
height: 100%; /*important for equal height columns*/
@nanchu
nanchu / rosechart.haml
Created October 5, 2012 04:50
Create a Rose Chart using ONLY HAML and SASS
.chartWrapper
- @chart = [[1, "Label 1"], [2, "Label 2"], [3, "Label 3"], [4, "Label 4"], [5, "Label 5"], [6, "Label 6"]]
- @chart.each do |chart, label|
%div{:class=>"chartContainer#{chart}"}
%div{:class=>"hold#{chart}", :id=>"chartSlice#{chart}"}
%div{:class=>"chart#{chart}"}
.label{:id=>"label#{chart}"}
%span #{label}
@nanchu
nanchu / 0_walkcycle.haml
Created September 30, 2012 00:09
Forward animated walk cycle
#walkingdude.keyframe0 //start him off on frame 0 of our sprite
@nanchu
nanchu / tumblrblog.haml
Created August 31, 2012 09:18
Tumblr Feed Blog View in Haml/Ruby
.blogContent
- @posts.each do |post|
- if post['photo_url']
- fotourl = post['photo_url'].first['__content__']
= fotourl
%div{:class=> "type", :id=> post['type']}