From 99e916beaf6afe5b2300bd95e73267550767bf7a Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Sat, 3 Dec 2016 14:23:02 -0600 Subject: Add Semantic-UI and get blockly working --- src/index.cljs.hl | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'src/index.cljs.hl') diff --git a/src/index.cljs.hl b/src/index.cljs.hl index c8be06d..2472649 100644 --- a/src/index.cljs.hl +++ b/src/index.cljs.hl @@ -1,10 +1,36 @@ (page "index.html" - (:require [app.rpc :as rpc])) + (:require [app.rpc :as rpc] + [Blockly])) + +(def toolbox + " + + + + + + + + ") + +(defelem blockly-workspace + [{:keys [options] :as attr} kids] + (let [elem (div (dissoc attr :options) kids)] + (with-init! + (set! (.-workspace elem) + (.inject js/Blockly elem (clj->js options)))) + elem)) + (html (head + (link :rel "stylesheet" :type "text/css" :href "css/semantic.min.css") + (script :src "blocks_compressed.js") + (script :src "en.js") (title "Tankputer")) (body - (h1 "Tankputer"))) + (h1 "Tankputer") + (blockly-workspace :css {:height "480px" :width "600px"} + :options {:media "media/" :toolbox toolbox}))) ;; vim: set expandtab ts=2 sw=2 filetype=clojure : -- cgit v1.2.3-18-g5258