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 = arguments
var later = function () {
timeout = null
fn.apply(context, args)
}
clearTimeout(timeout)
View trite-component.js
var html = require('yo-yo')
module.exports = function Component () {
var currentState
var element
function render (state) {
if (!element) {
currentState = state
return element = create(currentState)
View trite-view.js
var html = require('yo-yo')
module.exports = function View (store) {
var currentState = store.getState()
var subscribe = store.subscribe
var unsubscribe
var element
function load () {
unsubscribe = subscribe(update)
View AuntieSister.js
function walk(n, o, update, target) {
tree = update(n, o, target)
n = n.firstChildElement
o = o.firstChildElement
target = tree.firstChildElement
while (n || o) {
walk(n, o, update)
n = n.nextElementSibling
o = n.nextElementSibling
}