Skip to content

Instantly share code, notes, and snippets.

View jakebellacera's full-sized avatar

Jake Bellacera jakebellacera

View GitHub Profile
@jakebellacera
jakebellacera / proper-forms.html
Created January 19, 2011 00:24
A nicer-looking form.
<!-- Begin 'ze form -->
<h2>Contact Form</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<form>
<div>
<fieldset>
<legend>Name &amp; Stuff</legend>
@jakebellacera
jakebellacera / swfobject-gc.html
Created April 1, 2011 18:00
swfobject embedding for splash page/etc
<!-- Paste these in the head if you're using a splash page -->
<script src="/engine/js/jquery/jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript" src="/engine/js/swfobject/swfobject-2.2.js"></script>
<!-- The actual video -->
<div id="video_player">Loading...</div>
<script type="text/javascript">
{literal}
var vars = {};
var params = {};
@jakebellacera
jakebellacera / shell-buttons.scss
Created April 26, 2011 20:45
Custom CSS button framework for SASS
/**
* Shell Buttons
*/
@mixin shellBtn-colors($color) {
$color1: lighten($color, 15%);
$color2: lighten($color, 5%);
$color3: lighten($color, 10%);
$color4: $color;
$color5: darken($color, 10%);
border-color: $color5;
@jakebellacera
jakebellacera / mail.js
Created April 29, 2011 19:53
A super advanced JS emailer. Uses the JQuery Validation plugin.
/**
* Mail.js 1.1
* ===========
* A simple AJAX emailer
*/
$(function(){
$('#mailform').validate({
// Set rules for special fields (email/phone)
rules: {
#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