From 7f24616e36eb012e968112cdb104fa5d3f1d1934 Mon Sep 17 00:00:00 2001 From: s-ol Date: Thu, 18 Oct 2018 19:07:26 +1100 Subject: fix realities --- app/realities.moon | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/app/realities.moon b/app/realities.moon index d83109c..d4713a0 100644 --- a/app/realities.moon +++ b/app/realities.moon @@ -1,27 +1,24 @@ import append, h1, h2, p, a, i, div, ol, li, br, hr, span, button, section, article from require 'app.component' -import compile from require 'duct_tape' local Diagram, o GRID_W = 50 GRID_H = 40 -on_client = (fn, ...) -> - switch MODE - when 'SERVER' +on_client = switch MODE + when 'SERVER' + import compile from require 'duct_tape' + (fn, ...) -> code = compile fn - warn code + -- warn code append "" - when 'CLIENT' - fn ... + when 'CLIENT' + (fn, ...) -> fn ... -- script https://cdnjs.cloudflare.com/ajax/libs/svg.js/2.6.6/svg.min.js -on_client -> - js.global\alert 'hello world!' - if MODE == 'CLIENT' require 'svg.js' eval = js.global\eval @@ -124,7 +121,6 @@ figures = do 'justify-content': 'space-evenly' (...) -> div { :style, ... } - sources = do short = (id) => "#{id} #{@year}" long = => @names, " (#{@year}): ", (i @title), ", #{@published}" -- cgit v1.2.3