diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2018-10-27 06:11:19 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2018-10-27 06:11:19 +0000 |
| commit | eb556356062974f4e40f7c0347fd54098a0ce209 (patch) | |
| tree | 8cd56e0dcbd301ecc25824ac5285170eb647f254 /app/init.moon | |
| parent | styling (diff) | |
| download | mmm-eb556356062974f4e40f7c0347fd54098a0ce209.tar.gz mmm-eb556356062974f4e40f7c0347fd54098a0ce209.zip | |
rename to mmmfs, add canvas on client
Diffstat (limited to 'app/init.moon')
| -rw-r--r-- | app/init.moon | 30 |
1 files changed, 19 insertions, 11 deletions
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 |
