View config.json
{
"base": 18,
"scale": {
"ratio": "perfectFourth",
"steps": 8
},
"colors": {
"primary": [
{
"label": "transparent",
View component.js
var preact = require('preact')
module.exports = function Component (name, obj) {
name = name || 'F'
obj = obj || {}
var fn = function () { preact.Component.call(this) }
Object.defineProperty(fn, 'name', { value: name })
fn.prototype = Object.create(preact.Component.prototype)
fn.prototype = Object.assign(fn.prototype, obj)
if (obj.getDefaultProps &&
(typeof obj.getDefaultProps === 'function')) {
View component.js
var html = require('bel')
var morph = require('nanomorph')
var inWindow = require('in-window')
var onload = require('on-load')
module.exports = function Component (options) {
options = options || {}
var template = options.template
var should = options.should || function () { return true }
var added = options.added
View ro-sham-beaux.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>👊✋✌️</title>
<style>
/* RESET */
* {
margin: 0;
padding: 0;
View build.sh
#!/usr/bin/env node
var path = require('path')
var parse = require('minimist')
var browserify = require('browserify')
var args = parse(process.argv.slice(2))
var entries = args._
var output = args.o || args.output
var main = args.m || args.main
var url = args.url || output
View remove.js
function remove (state, data) {
var active = state.active.concat()
var i = 0
var l = active.length
var item
for (i; i<l; i++) {
item = active[i]
if (item.id === data.id) {
break
}
View update.js
function update (state, data) {
var active = state.active.concat()
var i = 0
var l = active.length
var item
for (i; i<l; i++) {
item = active[i]
if (item.id === data.id) {
active[i] = data
break
View fixed-header.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fixed header</title>
<style>
.container {
display: flex;
flex-direction: column;
position: absolute;
View debounce.js
function debounce (fn, wait) {
var timeout
return function () {
var context = this
var args = Array.prototype.slice.call(arguments)
var later = function () {
timeout = null
fn.apply(context, args)
}
clearTimeout(timeout)