Skip to content

Instantly share code, notes, and snippets.

@andershaig
andershaig / gist:4235168
Created December 7, 2012 18:11
Framework URLs
Framework CSS
@import url(//apps.wildfireapp.com/consumer/scorch/v1/scorch.css);
FitVids
<script src="//apps.wildfireapp.com/consumer/scorch/v1/fitvids.js"></script>
Enquire
<script src="//apps.wildfireapp.com/consumer/scorch/v1/enquire.js"></script>
@andershaig
andershaig / comments.js
Created December 11, 2012 00:15
Fix FB Comments for Mobile
// setup comments for mobile width
var w = screen.availWidth;
w = w < 320 ? 320:w;
if((typeof window.orientation) == 'number' && w <= 480) {
$(document.getElementsByTagName('fb:comments')).add('.fb-comments').each(function () {
this.setAttribute('width', w);
this.setAttribute('data-width', w);
});
};
@andershaig
andershaig / buttons.css
Created December 12, 2012 23:05
Boilerplate Buttons
button {
display: block;
margin: 0 auto;
padding: 7px 12px;
cursor: pointer;
font-size: 18px;
font-weight: 400;
text-transform: uppercase;
color: #FFF;
background: #666;
@andershaig
andershaig / redirect.js
Created February 11, 2013 20:53
Redirect to a URL after voting
$(document).bind('didRefreshWidgetContent', function () {
top.location.href = 'http://google.com/'; // Change the URL
});
@andershaig
andershaig / buttons.css
Last active December 14, 2015 04:59 — forked from anonymous/buttons.css
Social Sharing Buttons
.sharing-method {
position:relative;
display: inline-block;
padding:0 8px 0 46px;
border:1px solid #CCC;
font-size:13px;
line-height:28px;
color:#666;
min-width:120px;
text-align:center;
@andershaig
andershaig / custom.css
Created March 27, 2013 18:06
Bigger Items on Hover
.entry-body {
-webkit-animation-fill-mode:both;
-moz-animation-fill-mode:both;
-ms-animation-fill-mode:both;
-o-animation-fill-mode:both;
animation-fill-mode:both;
-webkit-transition: all 0.25s ease-in-out;
-moz-transition: all 0.25s ease-in-out;
-ms-transition: all 0.25s ease-in-out;
-o-transition: all 0.25s ease-in-out;
@andershaig
andershaig / custom.css
Created March 27, 2013 18:07
Items Wobble on Load
@-webkit-keyframes wobble {
0% { -webkit-transform: translateX(0%); }
15% { -webkit-transform: translateX(-25%) rotate(-5deg); }
30% { -webkit-transform: translateX(20%) rotate(3deg); }
45% { -webkit-transform: translateX(-15%) rotate(-3deg); }
60% { -webkit-transform: translateX(10%) rotate(2deg); }
75% { -webkit-transform: translateX(-5%) rotate(-1deg); }
100% { -webkit-transform: translateX(0%); }
}
@andershaig
andershaig / include.liquid
Last active December 16, 2015 01:59
In-template Notification
<style>
#tmp-notify {
position:absolute;
margin:20px;
left:0;
top:0;
right:0;
z-index:9999;
}
@andershaig
andershaig / fbcanvas.liquid
Last active December 18, 2015 05:29
Redirect users with support for referral tracking
{% plugin rawtext fanpage_url %}
<script type="text/javascript">
if (!document.body.className.match('page_preview')) {
var redir;
if (window.location.search) {
// Triggered if there's already a social referrer being tracked
var ref_search = window.location.search;
var ref = ref_search.split('=');
var ref_id = ref[1];
@andershaig
andershaig / fbcanvas.liquid
Last active December 18, 2015 05:29
Simple Redirect - This doesn't worry about social referral tracking, providing a different URL for mobile etc. It's just meant to be easier to understand and implement.
{% plugin rawtext desktop_redirect_url %}
<script type="text/javascript">
if (!document.body.className.match('page_preview')) {
// Redirects as soon as possible
setInterval( function () {
top.location.replace({{ desktop_redirect_url | json }});
},250);
}
</script>