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
import React, { Component } from 'react' | |
import PropTypes from 'prop-types' | |
export const templateConcat = (strings, expressions) => | |
strings.reduce((prevValue, currentValue, index) => { | |
const expressionValue = expressions[index] | |
if (expressionValue) { | |
return `${prevValue}${currentValue}${expressionValue}` | |
} | |
return `${prevValue}${currentValue}` |
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
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
if git rev-parse --verify HEAD >/dev/null 2>&1 |
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
"{"components":[{"order":0,"type":"cover","text":"sadfasdf","artwork":{"name":"Hostage","artist":"PaulMcDougall","url":"/PaulMcDougall/artwork/hostage-2/","tags":["carrot","creature","creatures","guard","guards","hostage","kidnap","paulmcdougall","prisoner","rabbit","rabbits","spears","vegetable","vegetablenap"],"id":"5ea25b4a-9931-4458-80d9-407fd48a5ae5","colors":["#609c00","#a84824","#6c6c6c","#cccccc","#000000","#c0a86c"],"formats":{"portrait":{"url":"http://dev-storybird.s3.amazonaws.com:80/artwork/PaulMcDougall/portrait/hostage-2.jpeg","width":386,"height":522},"full":{"url":"http://dev-storybird.s3.amazonaws.com:80/artwork/PaulMcDougall/full/hostage-2.jpeg","width":835,"height":522},"square":{"url":"http://dev-storybird.s3.amazonaws.com:80/artwork/PaulMcDougall/square/hostage-2.jpeg","width":551,"height":522},"landscape":{"url":"http://dev-storybird.s3.amazonaws.com:80/artwork/PaulMcDougall/landscape/hostage-2.jpeg","width":835,"height":393}},"thumbnail":{"url":"http://dev-storybird.s3.amazonaws.com:80/ |
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
{ | |
//(String)UID of the chapter | |
"id":"g9ks32xhd9", | |
//(String)UID of the book | |
"book_slug":"this-is-my-book", | |
//(String) URL of chapter | |
"url":"", | |
//(Object) contains info about the author | |
"author":{ | |
"url":"http://dev3.storybird.com/members/nick/", |
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
.book { | |
display: inline-block; | |
margin: 10px; | |
} | |
.book img { | |
vertical-align: middle; | |
} | |
.books { |
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
//source | |
//http://stackoverflow.com/questions/10672081/how-to-detect-if-browser-supports-plaintext-only-value-in-contenteditable-para | |
Modernizr.addTest('plaintextonly', function(){ | |
var d = document.createElement("div"); | |
try { | |
d.contentEditable="PLAINtext-onLY"; | |
} catch(e) { | |
return false; | |
} | |
return d.contentEditable=="plaintext-only"; |