This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>App</title> | |
<style> | |
*, *:before, *:after { margin: 0; padding: 0; box-sizing: border-box; } | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WithOutlets = { | |
componentWillMount: function() { | |
this.setOutlets(this.props); | |
}, | |
componentWillUpdate: function(nextProps) { | |
if(!nextProps || this.props.children !== nextProps.children) { | |
this.setOutlets(nextProps); | |
} | |
}, | |
setOutlets: function(props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
React.if = function(cond, trueCallback, falseCallback) { | |
if(cond && typeof trueCallback === 'function') { | |
return trueCallback(); | |
} | |
else if(!cond && typeof falseCallback === 'function') { | |
return falseCallback(); | |
} | |
}; | |
// Example usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////// | |
// Example of how to use this mixin.... | |
// - Think of UI components that can | |
define( | |
['flight/lib/component', 'mixins/with_set_cache'], | |
function(defineComponent, withSetCache, _) { | |
return defineComponent(myComponent, withSetCache); | |
function myComponent() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost *:80 | |
<Virtualhost *:80> | |
VirtualDocumentRoot "/Users/Joe/Sites/%1" | |
ServerName vhosts.dev | |
ServerAlias *.dev | |
UseCanonicalName Off | |
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon | |
ErrorLog "/Users/Joe/Sites/vhosts-error_log" | |
<Directory "/Users/Joe/Sites/*"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't forget to include AddThis. | |
// It's actually really good now so you should be using it. | |
$images = [ ]; // Or wherever your hidden images are. | |
// Show images temporarily if sharing to Pinterest | |
// (Because Pinterest won't see the backgrounds.) | |
if(typeof addthis !== 'undefined') { | |
addthis.addEventListener('addthis.menu.share', function(e) { | |
if (e.type == 'addthis.menu.share' && e.data.service === "pinterest_share") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tabs | |
@mixin round-out-tab($active_class: current, $radius: 8px, $tab_color: $purple, $outer_color: #fff) { | |
position: relative; | |
a { | |
@extend .btn; | |
} | |
&.#{$active_class} { | |
&:before, | |
&:after { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
form { | |
&.filtered { | |
opacity: 0.5; | |
} | |
// ---- | |
.field { | |
float: left; | |
&.selected { | |
background: yellow; | |
// --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.transition (@property: all, @duration: 0.6s, @delay: 0s) { | |
-webkit-transition: @property @duration ease @delay; | |
-moz-transition: @property @duration ease @delay; | |
-ms-transition: @property @duration ease @delay; | |
-o-transition: @property @duration ease @delay; | |
transition: @property @duration ease @delay; | |
} | |
/* Long-hand for overriding properties */ | |
.transition-property (@property) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.class { | |
background: rgba(255,255,255,0.8); | |
html.no-rgba & { | |
background: #eee; | |
} | |
} | |
/** Which would output as: **/ | |
.class { background: rgba(255,255,255,0.8); |