Significant progress, but a long way from finished.
This commit is contained in:
parent
7439e5ae15
commit
e5d399b86d
14 changed files with 496 additions and 234 deletions
|
|
@ -22,7 +22,8 @@
|
|||
(assoc params
|
||||
:page template
|
||||
:csrf-token *anti-forgery-token*
|
||||
:servlet-context *app-context*)))
|
||||
:servlet-context *app-context*
|
||||
:version (System/getProperty "youyesyet.version"))))
|
||||
"text/html; charset=utf-8"))
|
||||
|
||||
(defn error-page
|
||||
|
|
|
|||
|
|
@ -8,11 +8,25 @@
|
|||
(defn app-page []
|
||||
(layout/render "app.html"))
|
||||
|
||||
(defn call-me-page [request]
|
||||
(if
|
||||
request
|
||||
;; do something to store it in the database
|
||||
(layout/render "call-me-accepted.html" (:params request))
|
||||
(layout/render "call-me.html"
|
||||
{:title "Please call me!"
|
||||
;; TODO: Concerns need to be fetched from the database
|
||||
:concerns nil})))
|
||||
|
||||
(defn home-page []
|
||||
(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"))))
|
||||
(GET "/call-me" [] (call-me-page))
|
||||
(POST "/call-me" request (call-me-page request))
|
||||
(GET "/notyet" [] (layout/render "notyet.html"
|
||||
{:title "Can we persuade you?"}))
|
||||
(GET "/supporter" [] (layout/render "supporter.html"
|
||||
{:title "Have you signed up as a canvasser yet?"})))
|
||||
|
|
|
|||
|
|
@ -35,23 +35,23 @@
|
|||
[]
|
||||
[:div.container {:id "main-container"}
|
||||
[:h2 "Pre-alpha/proof of concept"]
|
||||
[:p {:class "centre"}
|
||||
[:p
|
||||
[:img {:src "img/ric-logo.png" :width "24" :height "24"}]
|
||||
" A project of the "
|
||||
[:a {:href "https://radical.scot/"} "Radical Independence Campaign"]]
|
||||
[:p {:class "centre"}
|
||||
[:p
|
||||
[:img {:src "img/luminus-logo.png" :alt "Luminus" :height "24" :width "24"}]
|
||||
" Built with "
|
||||
[:a {:href "http://www.luminusweb.net/"} "Luminus Web"]]
|
||||
[:p {:class "centre"}
|
||||
[:p
|
||||
[:img {:src "img/clojure-icon.gif" :alt "Clojure" :height "24" :width "24"}]
|
||||
" Powered by "
|
||||
[:a {:href "http://clojure.org"} "Clojure"]]
|
||||
[:p {:class "centre"}
|
||||
[:p
|
||||
[:img {:src "img/github-logo-transparent.png" :alt "GitHub" :height "24" :width "24"}]
|
||||
" Find me/fork me on "
|
||||
[:a {:href "https://github.com/simon-brooke/youyesyet"} "GitHub"]]
|
||||
[:p {:class "centre"}
|
||||
[:p
|
||||
[:img {:src "img/gnu.small.png" :alt "Free Software Foundation" :height "24" :width "24"}]
|
||||
" Licensed under the "
|
||||
[:a {:href "http://www.gnu.org/licenses/gpl-2.0.html"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue