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 { | |
StyleSheet, | |
css as stylesheetToClassNames, | |
} from 'aphrodite'; | |
import { Map } from 'immutable'; | |
const Prefixer = require('inline-style-prefixer'); | |
import { DEVELOPMENT } from '../config'; | |
const prefixer = new Prefixer({ userAgent: navigator.userAgent }); |
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
Show hidden characters
{ | |
"rules": { | |
"align": [true, "parameters", "statements"], | |
"arrow-parens": true, | |
"class-name": true, | |
"comment-format": [ | |
true, | |
"check-space" | |
], | |
"curly": true, |
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
const country = (seg) => /^[a-z]{2}$/.test(seg); | |
const midPrefix = (seg) => /^m|g$/.test(seg); | |
const midValue = (seg) => /^[a-zA-Z0-9_]+$/.test(seg); | |
const coMidPrefix = (seg) => /^m|g$/.test(seg); | |
const coMidValue = (seg) => /^[a-zA-Z0-9_]+$/.test(seg); | |
const darkNews = (seg) => seg === DARK_LABEL; | |
const year = (seg) => /^[0-9]{4}/.test(seg); | |
const month = (seg) => /^[0-9]{2}/.test(seg); | |
const day = (seg) => /^[0-9]{2}/.test(seg); |
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
# Find all markdown files | |
path = File.join(File.dirname(__FILE__), "source", "**/*.html.markdown") | |
# Also generate .latex files along side | |
Dir[path].each do |markdown_file| | |
http_path = markdown_file.split("source").last.gsub(".html.markdown", "") | |
page "#{http_path}.latex", :proxy => "#{http_path}.html", :latex => true, :layout => false | |
end | |
require "fileutils" |
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
(defn home-api-map | |
[] | |
{ :banner (model/pick :banner {:where {:slug "home"}}) | |
:intro-headline (model/pick :headline {:where {:slug "intro"}}) | |
:intro-slides (model/gather :slides {:where {:slug "intro"} :include {:slides {}}}) | |
:intro-highlights (model/gather :highlight {:where {:slug "intro"}}) | |
:tenants (model/gather :tenant) | |
:partners (model/gather :neighborhood-partner) | |
:whats-here-headline (model/pick :headline {:where {:slug "whats-here"}}) |
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
(defn load-json-channels-in-parallel | |
[channels] | |
(let [ch (chan)] | |
(go | |
(loop [open-channels channels | |
data {}] | |
(if (empty? open-channels) | |
(do | |
(>! ch data) | |
(close! ch)) |
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
(defn setup-scroll-watcher | |
[body-class] | |
(let [body-class (name body-class) | |
listener (shared/listen js/window :scroll) | |
debounced (shared/debounce listener 200)] | |
(dom/add-class! (.-body js/document) body-class) | |
(go | |
(loop [] |
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
// Option A | |
.slide-show__paging-button--next { | |
float: right; | |
} | |
// Option B | |
.Slideshow-pagingButton--next { | |
float: right; | |
} |
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
@mixin hoverable { | |
.hover &:hover { | |
@content; | |
} | |
} | |
#elem { | |
@include hoverable { | |
font-weight: bold; | |
} |