Skip to content

Instantly share code, notes, and snippets.

@andershaig
andershaig / default.css
Created October 23, 2012 17:31
Boilerplate Sharing
#sharing {
text-align: center;
margin-top: 20px;
margin-bottom: 10px;
overflow: hidden;
}
.like_and_send {
display:inline-block;
}
@andershaig
andershaig / default.css
Created October 23, 2012 17:26
Boilerplate Header
#header-logo {
margin: 30px 0;
}
#header-logo img {
display: block;
margin: 0 auto;
}
@andershaig
andershaig / console.js
Created August 16, 2012 16:14
Empty console.log for browsers lacking
if (!window.console) window.console={log:function(){}};
@andershaig
andershaig / countdown.css
Created August 14, 2012 16:38
Moving Countdown from Time Reveal Plugin
/* Countdown */
#clock { margin: 0 auto; overflow: hidden; width: 532px; }
#clock span { display: block; font-weight: 700; }
#clock .separator, #clock .amount { height: 76px; line-height: 76px; }
#clock .separator { float: left; font-size: 18px; font-weight: 700; text-align: center; width: 40px; }
#clock .section { float: left; overflow: hidden; position: relative; text-align: center; width: 103px; }
#clock .amount { background-image: url(//s3.amazonaws.com/wildfireapp/assets/number.png); font-size: 60px; font-weight: 400; letter-spacing: 20px; margin-bottom: 10px; overflow: hidden; padding: 0 7px; }
#clock .label { font-size: 18px; text-transform: uppercase; }
#clock .line { background-image: url(//s3.amazonaws.com/wildfireapp/assets/line.png); height: 2px; left: 0; overflow: hidden; position: absolute; text-indent: -999em; top: 38px; width: 100%; }
@andershaig
andershaig / voting.liquid
Created June 21, 2012 20:05
Voting with Categories Example
{% plugin voting my_voting %}
{% marker my_voting %}
<div class="voting">
{% formblock my_voting %}
{% if my_voting.has_categories %}
{% for category in my_voting.categories %}
<div class="category">
<h1>{{ category.title }}</h1>
{% for entry in category.entries %}
@andershaig
andershaig / gist:2962351
Created June 20, 2012 21:30
Simple Local HTTP Server
python -m SimpleHTTPServer
@andershaig
andershaig / gototop.js
Created June 11, 2012 21:29
Scroll Up After AJAX
$(document).bind('didRefreshWidgetContent', function () {
FB.Canvas.scrollTo(0,0); // Go to top of page
});
@andershaig
andershaig / style.css
Last active October 6, 2015 01:28
Common CSS Snippets
/* selector { css: value; } */
.container { height: 800px; }
/* 3 Column Galleries to 4 Column */
.row .span4 {
width: 23.333333333333%;
*width: 23.28014184397129%;
}
@andershaig
andershaig / add_classes.js
Created June 11, 2012 19:15
Add Page Classes
function checkWidth() {
var iframeWidth = $(window).width();
if (iframeWidth > 700) {
$('body').addClass('is_timeline');
} else {
$('body').removeClass('is_timeline');
}
};
@andershaig
andershaig / Test URLs
Created June 7, 2012 20:46
Standard Media Queries
Canvas: http://apps.facebook.com/wf-polls/pages/cb4abc1ff159d6550265a79e36f66e73
Microsite: https://apps.wildfireapp.com/microsite/pages/cb4abc1ff159d6550265a79e36f66e73
Fan Page: https://www.facebook.com/pages/Generic-T/302915683055517?sk=app_160731467314127
Mobile: https://apps.wildfireapp.com/fbmobile/5/pages/cb4abc1ff159d6550265a79e36f66e73