     
     c))
 
-(defn widget "a widget"
+(defn widget-view "widget pane"
+  [id]
+  
+  [:div.col.col-xs-12.col-md-12.bootcards-cards
+   [:div.panel.panel-default
+    [:div.panel-heading.clearfix
+     [:h3.panel-title.pull-left "Widget Card Title"]
+     [:a.btn.btn-primary.pull-right {:href "#"}
+      [:i.fa.fa-pencil] "Edit"]]
+    [:div.list-group
+     [:div.list-group.item
+      [:p.list-group-item-text "Name"]
+      [:h4.list-group-item-heading "Jean Leflambeur"]]
+     [:div.list-group.item
+      [:p.list-group-item-text "Occupation"]
+      [:h4.list-group-item-heading "Thief"]]
+     [:div.list-group.item
+      [:p.list-group-item-text
+       "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam
+      mauris tellus, vehicula ut tellus id, suscipit dapibus tortor.
+      Integer viverra turpis ac fringilla hendrerit. Sed faucibus
+      posuere felis et pe."]]]
+    [:div.panel-footer
+     [:small "Take a card, any card"]]]])
+
+(defn widget-item "a widget"
   [{:keys [name] :as x}]
   ;; (println "widget " x)
   ;; :li.widget
-  [:a.widget.list-group-item {:href "#"}
+  [:a.widget.list-group-item {:href (str "#/" (last (split name #" ")))}
    [:h4..list-group-item-heading "widget card"] 
    [:label.list-group-item-text name]
    ;; [:span.glyphicon.glyphicon-chevron-right.pull-right]

     [:h3 "widget-list"]
     [:ul.list-group
         (for [item  @state]
           ^{:key (str "widget" (rand-int 100))} [widget item])]])

(defn widget-box []
  [:div.widget-box.panel.panel-default

  [:div.col.col-xs-12.col-md-12.bootcards-list {:id "main-page"}
   [:h1 "main-page"]
   [widget-box]])

(defroute widget-route "/:id" [id]
  (.log js/console  "widget-route" id) 
  (let [widget-id (read-string id)] 
    (reagent/render-component [widget-view widget-id] (gdom/getElement "content"))))

(let [h (History.)]
  (goog.events/listen h goog.history.EventType.NAVIGATE #(secretary/dispatch! (.-token %)))
  (doto h
    (.setEnabled true)))

(reagent/render-component [main-page] (gdom/getElement "content"))

