minor refactoring
This commit is contained in:
+16
-16
@@ -60,22 +60,6 @@
|
|||||||
links (interpose separator links)]
|
links (interpose separator links)]
|
||||||
[:div#panel (map identity links)]))))
|
[:div#panel (map identity links)]))))
|
||||||
|
|
||||||
; Routes
|
|
||||||
; ======
|
|
||||||
|
|
||||||
; Landing Page
|
|
||||||
(defpage "/" {}
|
|
||||||
(layout (get-message :page-title)
|
|
||||||
[:div#hero
|
|
||||||
[:h1 (get-message :name)]
|
|
||||||
[:h2 (get-message :title)]
|
|
||||||
[:br]
|
|
||||||
[:a.landing-button {:href "/new" :style "color: white"} (get-message :new-page)]]
|
|
||||||
[:div#dashed-line]
|
|
||||||
[:article.helvetica.bottom-space.markdown {:style "font-size: 1em"}
|
|
||||||
(slurp "LANDING.md")]
|
|
||||||
[:div.centered.helvetica.markdown (get-message :footer)]))
|
|
||||||
|
|
||||||
; input form for the markdown text with a preview area
|
; input form for the markdown text with a preview area
|
||||||
(defpartial input-form [form-url command fields content passwd-msg]
|
(defpartial input-form [form-url command fields content passwd-msg]
|
||||||
(let [css-class (when (= :publish command) :hidden)]
|
(let [css-class (when (= :publish command) :hidden)]
|
||||||
@@ -94,6 +78,22 @@
|
|||||||
(submit-button {:class "button ui-elem"
|
(submit-button {:class "button ui-elem"
|
||||||
:id :publish-button} (get-message command))])])))
|
:id :publish-button} (get-message command))])])))
|
||||||
|
|
||||||
|
; Routes
|
||||||
|
; ======
|
||||||
|
|
||||||
|
; Landing Page
|
||||||
|
(defpage "/" {}
|
||||||
|
(layout (get-message :page-title)
|
||||||
|
[:div#hero
|
||||||
|
[:h1 (get-message :name)]
|
||||||
|
[:h2 (get-message :title)]
|
||||||
|
[:br]
|
||||||
|
[:a.landing-button {:href "/new" :style "color: white"} (get-message :new-page)]]
|
||||||
|
[:div#dashed-line]
|
||||||
|
[:article.helvetica.bottom-space.markdown {:style "font-size: 1em"}
|
||||||
|
(slurp "LANDING.md")]
|
||||||
|
[:div.centered.helvetica.markdown (get-message :footer)]))
|
||||||
|
|
||||||
; Update Note Page
|
; Update Note Page
|
||||||
(defpage "/:year/:month/:day/:title/edit" {:keys [year month day title]}
|
(defpage "/:year/:month/:day/:title/edit" {:keys [year month day title]}
|
||||||
(let [noteID (api/build-key [year month day] title)]
|
(let [noteID (api/build-key [year month day] title)]
|
||||||
|
|||||||
Reference in New Issue
Block a user