         level (count parts)
         base (last parts)
         icon (if (blob? item) (ftype-to-icon base) (nm "i.ftype.fa.fa-folder-open-o"))]
-    (nm "div.pure-g" [(nm "div.pure-u-1.pure-u-sm-1-2" [(nm (str "div.level" level) [icon base])])
-                      (annotate index item)])))
+    (nm "div.pure-g" [(nm "div.pure-u-1.pure-u-sm-1-2"
+                          [(nm (str "div.level" level) {:onclick #(toggle-item-detail index)} [icon base])])
+                      (annotate index item)
+                      (item-detail index item)])))
 
 (defn reporender
   "Render repository trees"

    (println "Editing: " pos key value)
    (save item pos)))

(defn close
  [pos]
  (let [editing (querydb [:editing])]
    (updatedb [:editing] (disj editing pos))))

;; Utils

(defn blob?
  [item]
  (if (= (get item "type") "blob") true false))

(defn editing?
  [pos]
  (contains? (querydb [:editing]) pos))

;; App



(defn querydb [fields]
  (get-in db fields))


;; Utils

(defn blob?
  [item]
  (if (= (get item "type") "blob") true false))

(defn editing?
  [pos]
  (contains? (querydb [:editing]) pos))

(defn opened?
  [pos]
  (contains? (querydb [:opened]) pos))

;; Handlers

(defn edit [pos]
  (let [editing (querydb [:editing])]
