 
 
 (def app-model
-  (atom {:current-slide 5
+  (atom {:current-slide 3
          :slides
-         [{:title "core.async"}
-
-          {:title "Why?"
+         [{:title "core.async"
+           :event "QCon 2014"
+           :author "Malcolm Sparks"
+           :company "JUXT"
+           :email "malcolm@juxt.pro"
+           :twitter "@malcolmsparks"
+           }
+
+          {:subtitle "What is core.async?"
            ;;:text "Here is the first slide"
            ;;:background "/static/cspdiag.jpg"
-           :content [:ul
-                     {:li "One"}
-                     {:li "Two"}]}
-
-          {:title "What?"}
+           :bullets ["Clojure library released May 2013"
+                     "Based on Communicating Sequential Processes"
+                     "Available in Clojure and ClojureScript"]
+           }
+
+          {:title "Quick tutorial"}
+
+          {:title "put and take"
+           :builder fig-put-and-take}
 
           {:title "Buffers"
            :code "(<! (chan))"}
 
-          {:title "Diagram"
-           :builder builder}
-
-          {:title "put and take"
-           :builder diagram-1}
-
           {:title "When?"}]}))
+
+(defn source-snippet [data owner fname]
+  (reify
+    om/IWillMount
+    (will-mount [_]
+      (GET "/source"
+          (-> {:handler (fn [e]
+                          (println "Returned " e)
+                          (om/set-state! owner :text e))
+               :headers {"Accept" "text/plain"}
+               :response-format :raw})))
+    om/IRender
+    (render [_]
+      (html
+       [:pre ;; {:class "brush: clojure" :style {:width "95%"}}
+        (om/get-state owner :text)]))
+    #_om/IDidUpdate
+    #_(did-update [this prev-props prev-state]
+      (.setAttribute (-.class (om/get-node owner))  "brush: clojure")
+      #_(goog.dom.classes.add (om/get-node owner) "brush: clojure"))))
 
 (defn slide [data owner current]
   (reify

             (apply vec content)
             )
           (when-let [code (:code data)]
             [:pre code]
             )
           #_(when (:custom data)
               [:svg {:version "1.1" :width 600 :height 600}


(def default-font "72pt")

(defn fig-put-and-take [data owner]
  [:div
   [:svg {:version "1.1" :width 800 :height 600}

    [:g {:transform "translate(70,65)"
         :onClick (fn [_]
