#30: Starting to work.
We can serve both conventional pages, and the app.
This commit is contained in:
parent
ce9520fc2c
commit
7439e5ae15
6 changed files with 152 additions and 54 deletions
|
|
@ -5,11 +5,14 @@
|
|||
[ring.util.http-response :as response]
|
||||
[clojure.java.io :as io]))
|
||||
|
||||
(defn app-page []
|
||||
(layout/render "app.html"))
|
||||
|
||||
(defn home-page []
|
||||
(layout/render "home.html"))
|
||||
(layout/render "home.html" {:title "You Yes Yet?"}))
|
||||
|
||||
(defroutes home-routes
|
||||
(GET "/" [] (home-page))
|
||||
(GET "/app" [] (app-page))
|
||||
(GET "/docs" [] (-> (response/ok (-> "docs/docs.md" io/resource slurp))
|
||||
(response/header "Content-Type" "text/plain; charset=utf-8"))))
|
||||
|
||||
|
|
|
|||
1
src/cljc/youyesyet/ui_utils.cljc
Normal file
1
src/cljc/youyesyet/ui_utils.cljc
Normal file
|
|
@ -0,0 +1 @@
|
|||
;; Ultimately it's the goal to use the same UI utils for both main site and single page app.
|
||||
Loading…
Add table
Add a link
Reference in a new issue