From d2fe6d6c82b30e704c2fd87df6d5d37aa8d7ba52 Mon Sep 17 00:00:00 2001 From: s-ol Date: Sat, 30 Jun 2018 16:03:41 +0200 Subject: add realities --- app/index.moon | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'app/index.moon') 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 " -- cgit v1.2.3