View a11y_feedback.md
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
};
NodeList.prototype.__proto__ = Array.prototype;
View SassMeister-input.scss
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
@mixin responsive-calc($columns: 2, $under: 480px) {
$pre-computed-calc: #{($under * ($under / 1px))} - #{(100% * ($under / 1px))};
display: inline-block;
min-width: ($under / $columns);
View SassMeister-input.scss
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
/// Map of breakpoints
/// @type Map
$breakpoints: (
'small': '(min-width: 860px)',
'medium': '(min-width: 1000px)',
View build.sh
#!/bin/sh
# Stop if any of the following commands fails
set -e
# Add local executables to PATH
PATH=$(npm bin):$PATH
# Variables & configuration
DIST_FOLDER=_site
View theme.scss
/// This function is exactly like `map-get` except it goes deeper.
/// You pass the map as first argument and then an unlimited number of keys to be accessed.
/// If a key cannot be reached, the function aborts and returns `null`.
@function map-deep-get($map, $keys...) {
@each $key in $keys {
$map: map-get($map, $key);
@if (type-of($map) == 'null') { @return $map; }
}
View en.yml
# _data/en.yml
header:
title: "Hello world!"
View MyCoolComponent.js
import React from 'react';
import MyCoolTextarea from '../MyCoolTextarea';
import MyCoolCounter from '../MyCoolCounter';
const MyCoolComponent = React.createClass({
// Define a method on the parent component describing what should happen when
// the textarea gets updated. At this point, the only thing needed is to store
// the length of the textarea’s content in a state on the parent component.
//
View doc-parser.js
// Here is a very simple Node.js script to perform GET HTTP requests to a
// collection of similar pages (see `URLS`) in order to extract some information
// from the (virtual) DOM. For instance, you could parse an array of pages and
// grab the title of each of them.
//
// The script then writes the resulting data (an array as well, of course) in a
// JSON file (see `DEST_FILE`). It will also cache the requested HTML documents
// in a cache file (see `CACHE_FILE`) in order to avoid having to perform all
// the HTTP requests when only the collected data changes (see `parseData`).
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
/// Performs right-to-left function composition.
/// The rightmost function may have any arity;
/// the remaining functions must be unary.
///
/// @see http://ramdajs.com/docs/#compose Ramda Compose
///