                       (content (if (= "" title) url title)))
    ;;[:.url-user] (content email)
    [:.url-ts] (content (.toLocaleString ts))})
+
+(defsnippet welcome "templates/welcome" [:#register-message]
+  [app owner state]
+  {[:#sign-up-username] (do-> (set-attr :value (:sign-up-username state))
+                              (listen :on-change #(handle-text-change % owner :sign-up-username)))
+   [:#sign-up-mail] (do-> (set-attr :value (:sign-up-email state))
+                          (listen :on-change #(handle-text-change % owner :sign-up-email)
+                                  :on-key-down #(if (= (.-keyCode %) 10)
+                                                  (send-registry app owner)
+                                                  (when (= (.-which %) 13)
+                                                    (when (.-ctrlKey %)
+                                                      (send-registry app owner))))))})
 
 
 (deftemplate bookmarks "templates/bookmarks.html"

                        :verify-token (do
                                        (om/transact! app :user (fn [old new] (assoc-in old [:token-status] data)))
                                        (case data
                                          :valid (>! ws-channel {:topic :get-all-bookmarks :data nil :token (:token local-store)})
                                          :invalid (om/set-state! owner :info-text "invalid token")
                                          :expired (om/set-state! owner :info-text "token expired")))
                        (println "Unknown topic"))

            [chord.client :refer [ws-ch]])
  (:require-macros [kioo.om :refer [defsnippet deftemplate]]
                   [cljs.core.async.macros :refer [go go-loop]]))

(enable-console-print!)

