Skip to content

Instantly share code, notes, and snippets.

View jamesslock's full-sized avatar

James Seymour-Lock jamesslock

  • Ebates, Rakuten
  • New York City
View GitHub Profile
@jamesslock
jamesslock / gist:767b36b2760a2e409d9d
Last active August 29, 2015 14:17
Simple React Button Component
var React = require('react'),
Classable = require('../mixins/classable.jsx');
var Button = React.createClass({
mixins: [Classable],
buildAriaLabel: function() {
return "" + this.props.ariaLabel;
},
// Buttons
$btn-font-weight: normal;
$btn-font-size: 14px;
$btn-large-font-size: 18px;
$btn-base-color: white;
$btn-base-bg: $brand-tertiary;
$btn-primary-color: white;
.posts__post {
@include media(min-width 520px, 6) {
@include span-columns(3);
}
@include media(min-width 520px max-width 767px, 6) {
@include omega(2);
&:nth-child(3) {
.section-header {
position: relative;
margin-bottom: $padding-base-vertical;
@extend %clearfix;
&:before {
content: '';
z-index: 10;
position: absolute;
@jamesslock
jamesslock / hipster-markdown.md
Last active August 29, 2015 14:05
Blog post placeholder content in markdown with a hipster twist

If you run a sustainable slow-carb food truck, here’s how we fit in

Bushwick literally narwhal four loko, Marfa actually brunch post-ironic meggings cornhole. Banh mi pug dreamcatcher, forage Truffaut Tonx distillery quinoa bicycle rights vegan mustache asymmetrical viral disrupt. Gentrify raw denim aesthetic, mlkshk keffiyeh lo-fi mixtape keytar XOXO Blue Bottle before they sold out.

Brooklyn Schlitz pour-over tote bag

Truffaut seitan craft beer mumblecore ennui. Fanny pack Williamsburg jean shorts bitters forage gentrify. Biodiesel Intelligentsia chia, Tumblr locavore kale chips stumptown blog meh. Gluten-free umami kogi, fashion axe jean shorts chambray mustache chillwave roof party pop-up put a bird on it ugh.

Placeholder large

@jamesslock
jamesslock / gist:46b7f3c3826e7266de4a
Created August 5, 2014 11:14
Open Graph Meta Simple as Milk
-# Data Setup -----------------------------------------------------------------
- default_title = "Simple as Milk"
- default_description = "It's data that makes a beautiful experience and it's personality that makes that experience human. You guessed it; we design and build user experiences."
- @title = yield_content(:title).presence || current_page.data.title || default_title
- @description = (yield_content(:meta_description).presence || current_page.data.description || default_description)
- @author = {}
- if current_article.present?
@jamesslock
jamesslock / gist:10655393
Created April 14, 2014 14:54
Thats what I call a mixin 97
// Fluid Squares
// -------------------------------------------------------
@mixin box($box-size: 3rem, $fluid: false) {
display: inline-block;
position: relative;
width: rems-as-pixels($box-size);
width: $box-size;
text-align: center;
@if($fluid) {
height: 0;
@jamesslock
jamesslock / gist:9618576
Created March 18, 2014 11:51
Diamonds mixin
// Fluid Squares
// -------------------------------------------------------
@mixin box($box-size: 3rem, $fluid: false) {
display: inline-block;
position: relative;
width: rems-as-pixels($box-size);
width: $box-size;
text-align: center;
@if($fluid) {
height: 0;
.nav--diamonds {
margin: 2rem 0;
li .btn {
margin: 2rem 2rem;
}
@include mq(349, false, max) {
width: 300px;
li:nth-child(n+4) .btn {
margin: -2.5rem 2rem 2rem 2rem;
}
@jamesslock
jamesslock / gist:9231599
Created February 26, 2014 15:27
Clusterfuck rem mixin
/ Fluid Squares
// -------------------------------------------------------
@mixin box($box-size: 4rem, $fluid: false) {
display: inline-block;
position: relative;
width: $box-size;
text-align: center;
@if($fluid) {
height: 0;
padding-bottom: $box-size;