This commit is contained in:
Dan Holmsand 2015-09-08 20:26:07 +02:00
parent ee2644836d
commit 12dd517b55
1 changed files with 5 additions and 13 deletions

View File

@ -20,29 +20,21 @@
:alt "Fork me on GitHub" :alt "Fork me on GitHub"
:src "https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png"}]]) :src "https://s3.amazonaws.com/github/ribbons/forkme_left_orange_ff7600.png"}]])
;; (def index-page "index.html") (def index-page "/index.html")
;; (def news-page "news/index.html")
;; (tools/register-page index-page [#'intro/main]
;; "Reagent: Minimalistic React for ClojureScript")
;; (tools/register-page news-page [#'news/main]
;; "Reagent news")
(def title "Minimalistic React for ClojureScript") (def title "Minimalistic React for ClojureScript")
(tools/register-page index-page [#'intro/main] title)
(defroute "/" [] (defroute "/" []
(dispatch [:set-content [#'intro/main] title])) (dispatch [:set-content [#'intro/main] title]))
(defroute main-page "/index.html" []
(dispatch [:set-content [#'intro/main] title]))
(tools/reg-page (main-page))
(defn demo [] (defn demo []
[:div [:div
[:div.nav [:div.nav
[:ul.nav [:ul.nav
[:li.brand [link {:href (main-page)} "Reagent:"]] [:li.brand [link {:href index-page} "Reagent:"]]
[:li [link {:href (main-page)} "Intro"]] [:li [link {:href index-page} "Intro"]]
[:li [link {:href news/url} "News"]] [:li [link {:href news/url} "News"]]
[:li [:a github "GitHub"]]]] [:li [:a github "GitHub"]]]]
@test-results @test-results