From eb556356062974f4e40f7c0347fd54098a0ce209 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 27 Oct 2018 17:11:19 +1100 Subject: rename to mmmfs, add canvas on client --- app/init.moon | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'app/init.moon') diff --git a/app/init.moon b/app/init.moon index daa2d47..e1f7a75 100644 --- a/app/init.moon +++ b/app/init.moon @@ -7,42 +7,48 @@ patch_redirs = -> 'play-tags': 'tags', { :location } = window - if location.search and #location.search > 1 + if (not location.search\find '=') and #location.search > 1 name = location.search\sub 2 location.href = redirs[name] or name +client_goto = -> + { :location } = window + if module = location.search\match 'client=([%w_]+)' + document.body.innerHTML = '' + require 'app.' .. module + experiments = { { - name: 'twisted', + name: 'twisted' desc: 'pseudo 3d animation' }, { - name: 'koch', - desc: "lil' fractal thing", + name: 'koch' + desc: "lil' fractal thing" }, { - name: 'realities', + name: 'realities' desc: 'a paper on virtual and other realities' }, { - name: 'center_of_mass', + name: 'center_of_mass' desc: 'aligning characters by their centers of mass' }, { - name: 'todo', + name: 'todo' desc: 'Todo MVC with the mmm UI framework' }, { - name: 'test_component', + name: 'test_component' desc: 'test suite for the mmm reactive UI framework' }, { - name: 'tags', + name: 'tags' desc: 'organizing files with Functional Tags' }, { - name: 'tablefs', - desc: 'a (file)system to live in' + name: 'mmmfs' + desc: 'an operating, file- and living system' }, } @@ -83,6 +89,8 @@ table.insert routes, { "made with #{moon} by " a { 's-ol', href: 'https://twitter.com/S0lll0s' } } + + on_client client_goto } destify = (route) -> with route -- cgit v1.2.3