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