NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
// Image replacement scss mixin | |
@mixin image_replace($img, $width, $height, $x: 0, $y: 0) { | |
display: block; | |
background: image-url($img) no-repeat $x $y; | |
width: $width; | |
height: $height; | |
overflow: hidden; | |
text-indent: -9999em; | |
} |
// Paste into Firebug or Chrome Dev Tools console | |
// when viewing a page with multiple checkboxes. | |
(function(d) { | |
var input = d.querySelectorAll('input[type="checkbox"]'); | |
var i = input.length; | |
while (i--) { | |
input[i].checked = true; | |
} |
@mixin fancy-hover($sprite_dir, $off_state, $hover_state, $speed: 0.3s) | |
$sprites: sprite-map("#{$sprite_dir}/*.png") | |
$width: image-width(sprite_file($sprites, $off_state)) | |
$height: image-height(sprite_file($sprites, $off_state)) | |
@include hide-text | |
width: $width | |
height: $height | |
background: sprite($sprites, $off_state) no-repeat | |
display: block | |
position: relative |
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], |
require 'sinatra' | |
get '/' do | |
File.read(File.join('public', 'index.html')) | |
# or | |
# send_file File.join(settings.public, 'index.html') | |
end |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
// Simple, single configuration file to override almost all paths and server settings. As used by @airways | |
// and @litzinger. | |
// Only check in the default as dist.config.php, set your version control system to ignore config.php so that | |
// local users and each instance (staging, production) can have their own settings. | |
// These config files are mainly meant to be used on a shared development server used by all developers, | |
// although it works almost as well for local development as well. |
.tumblr_posts { | |
.tumblr_post { | |
.tumblr_title {} | |
.tumblr_body img {} | |
.read_more_container {} | |
.read_more_container a.read_more {} | |
} | |
.tumblr_text_post { |
$sprites: sprite-map("sprites/*.png"); | |
$sprites-retina: sprite-map("sprites-retina/*.png"); | |
@mixin sprite-background($name) { | |
background-image: sprite-url($sprites); | |
background-position: sprite-position($sprites, $name); | |
background-repeat: no-repeat; | |
display: block; | |
height: image-height(sprite-file($sprites, $name)); | |
width: image-width(sprite-file($sprites, $name)); |