diff options
Diffstat (limited to 'app/index.moon')
| -rw-r--r-- | app/index.moon | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/app/index.moon b/app/index.moon index c05edcd..d566ed1 100644 --- a/app/index.moon +++ b/app/index.moon @@ -4,6 +4,13 @@ document = window.document import h1, p, a, br, ul, tt, li from require './html.moon' moon = '\xe2\x98\xbd' +demos = + twisted: 'canvas animation', + todo: 'Todo demo of a simple reactive UI framework', + realities: 'SVG graphics for a paper on VR and realities', + 'center-of-mass': 'aligning characters by their centers of mass', + 'test-component': 'Test suite for the UI framework', + back_button = -> document.body\appendChild p a { '< back', href: '/' } @@ -20,6 +27,9 @@ switch window.location.search when '?test-component' then back_button! require './test_component.moon' + when '?realities' then + back_button! + require './realities.moon' else document.body\appendChild h1 'mmm' document.body\appendChild p { @@ -35,8 +45,8 @@ switch window.location.search '.' } document.body\appendChild p 'current demos:' - document.body\appendChild ul for name in *{'twisted', 'center-of-mass', 'todo', 'test-component'} - li a { name, href: "/?#{name}" } + document.body\appendChild ul for name, desc in pairs demos + li (a name, href: "/?#{name}"), ': ', desc document.body\appendChild p { "made with #{moon} by " |
