mirror of
https://github.com/status-im/reagent.git
synced 2025-01-14 05:45:06 +00:00
Cleanup
This commit is contained in:
parent
7284460ef7
commit
27ef8a42fd
@ -26,19 +26,18 @@
|
||||
(tools/register-page index-page [#'intro/main] title)
|
||||
|
||||
(defroute "/" []
|
||||
(dispatch [:set-content [#'intro/main] title]))
|
||||
(dispatch [:set-page index-page]))
|
||||
|
||||
|
||||
(defn demo []
|
||||
[:div
|
||||
[:div.nav
|
||||
[:ul.nav
|
||||
[:li.brand [link {:href index-page} "Reagent:"]]
|
||||
[:li [link {:href index-page} "Intro"]]
|
||||
[:li [link {:href news/url} "News"]]
|
||||
[:li [:a github "GitHub"]]]]
|
||||
@test-results
|
||||
[tools/page-content]
|
||||
[:div.nav>ul.nav
|
||||
[:li.brand [link {:href index-page} "Reagent:"]]
|
||||
[:li [link {:href index-page} "Intro"]]
|
||||
[:li [link {:href news/url} "News"]]
|
||||
[:li>a github "GitHub"]]
|
||||
[:div @test-results]
|
||||
[tools/main-content]
|
||||
[github-badge]])
|
||||
|
||||
(defn init! []
|
||||
|
@ -34,9 +34,9 @@
|
||||
|
||||
;;; Configuration
|
||||
|
||||
(declare page-content)
|
||||
(declare main-content)
|
||||
|
||||
(defonce config (r/atom {:body [#'page-content]
|
||||
(defonce config (r/atom {:body [#'main-content]
|
||||
:main-content [:div]
|
||||
:pages #{}
|
||||
:site-dir "outsite/public"
|
||||
@ -118,10 +118,10 @@
|
||||
(dispatch [:goto-page (:href props)])))
|
||||
child])
|
||||
|
||||
(defn page-content []
|
||||
(let [{:keys [main-content]} @config]
|
||||
(assert (vector? main-content))
|
||||
main-content))
|
||||
(defn main-content []
|
||||
(let [{comp :main-content} @config]
|
||||
(assert (vector? comp))
|
||||
comp))
|
||||
|
||||
|
||||
;;; Static site generation
|
||||
|
Loading…
x
Reference in New Issue
Block a user