Skip to content

Instantly share code, notes, and snippets.

View jakebellacera's full-sized avatar

Jake Bellacera jakebellacera

View GitHub Profile
#content .wrapper > header:before,
#content .wrapper > header:after {
content: "";
position: absolute;
bottom: 18px;
left: 10px;
width: 49%;
height: 20%;
z-index: -1;
box-shadow: 0 15px 10px rgba(0, 0, 0, 0.25);
@jakebellacera
jakebellacera / .vimrc
Created May 5, 2011 05:27 — forked from jeresig/.vimrc
VIM Config
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
set nocompatible
set autoindent
set tabstop=2
set showmatch
set vb t_vb=
set ruler
set nohls
set incsearch
syntax on
@jakebellacera
jakebellacera / fixed-scrollable-content.js
Created May 19, 2011 04:42
When an element scrolls out of the window, it "sticks" in it's position.
// "Stuck" menu listing header
var Sticky = function( $obj, opts ){
$(window).scroll(
function(e){
Sticky.onScroll(e, $obj, opts );
});
}
Sticky.onScroll = function( e, $o, opts ){
@jakebellacera
jakebellacera / css-sections.css
Created May 26, 2011 17:21
A model for CSS comments/sections (great for find & replace!)
/**
* Section Declaration
* ===================
* This is an optional description of the section.
* You might want to talk about what's going on in
* here, or maybe you don't need one at all.
*/
/* Child section -- something relevant to the parent section */
@jakebellacera
jakebellacera / sticky.js
Created June 21, 2011 07:42
"Sticky" elements -- scrolls with the content when the window begins to hide it
// "Stuck" menu listing header
var Sticky = function( $obj, opts ){
$(window).scroll(
function(e){
Sticky.onScroll(e, $obj, opts );
});
}
Sticky.onScroll = function( e, $o, opts ){
#drop
.wrapper
.nav // tabs for each .pane
.pane
.subnav // tabs for each .section
.section // content areas
.pane.discipline // contains discipline layouts
.subnav // tabs for each .section
.section // content areas
@mixin box-shadow($shadow-1: default, $shadow-2: false, $shadow-3: false, $shadow-4: false, $shadow-5: false, $shadow-6: false, $shadow-7: false, $shadow-8: false, $shadow-9: false, $shadow-10: false) {
// This has to be on a single line due to a bug in the scss parser: https://github.com/nex3/sass/issues/issue/26
$legacy: type-of($shadow-1) == color and type-of(if($shadow-2, $shadow-2, 0)) == number and type-of(if($shadow-3, $shadow-3, 0)) == number and type-of(if($shadow-4, $shadow-4, 0)) == number and type-of(if($shadow-5, $shadow-5, 0)) == number and ($shadow-6 == inset or type-of($shadow-6) == bool) and ($shadow-2 or $shadow-3 or $shadow-4 or $shadow-5 or $shadow-6);
@if $legacy {
@warn "Passing separate arguments for a single shadow to box-shadow is deprecated. " + "Pass the values as a single space-separated list, or use the single-box-shadow mixin. " + "See http://beta.compass-style.org/help/tutorials/upgrading/antares/ for more info.";
@include single-box-shadow(if($shadow-1, $shadow-1,
w = container width
s = spacing
n = amount of columns
=====
CSS
=====
.columns {
width: w; /* Width is purely optional. Static, non-floating block elements default at 100% */
ul.nav
li.parent
a
ul.child
li
a
li
a
li
a
def facebook_like(url)
if !url
url = 'http://spyder.com'
if !Rails.env.development?
"<li class=\"fblike\"><iframe src=\"http://www.facebook.com/plugins/like.php?app_id=243807848982732&amp;href=#{URI.escape(url)}&amp;send=false&amp;layout=button_count&amp;width=84&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:84px; height:21px;\" allowTransparency=\"true\"></iframe></li>"
end
end