|
|
@ -1,6 +1,6 @@
|
|
|
|
(ns wanijo.framework.view
|
|
|
|
(ns wanijo.framework.view
|
|
|
|
(:require [hiccup.page :refer
|
|
|
|
(:require [hiccup.page :refer
|
|
|
|
[html5 include-css]]))
|
|
|
|
[html5 include-css]]))
|
|
|
|
|
|
|
|
|
|
|
|
(defn btnlink
|
|
|
|
(defn btnlink
|
|
|
|
([target caption]
|
|
|
|
([target caption]
|
|
|
@ -19,29 +19,29 @@
|
|
|
|
authed? (some? ident)
|
|
|
|
authed? (some? ident)
|
|
|
|
devmode? (:devmode session)]
|
|
|
|
devmode? (:devmode session)]
|
|
|
|
(html5
|
|
|
|
(html5
|
|
|
|
[:head
|
|
|
|
[:head
|
|
|
|
[:meta {:charset "utf-8"}]
|
|
|
|
[:meta {:charset "utf-8"}]
|
|
|
|
[:meta {:name "viewport"
|
|
|
|
[:meta {:name "viewport"
|
|
|
|
:content "width=device-width,initial-scale=1,shrink-to-fit=no"}]
|
|
|
|
:content "width=device-width,initial-scale=1,shrink-to-fit=no"}]
|
|
|
|
[:title (str "wan ijo" (when title (str " - " title)))]
|
|
|
|
[:title (str "wan ijo" (when title (str " - " title)))]
|
|
|
|
(include-css "/css/app.css")
|
|
|
|
(include-css "/css/app.css")
|
|
|
|
(when devmode? (include-css "/css/devmode.css"))]
|
|
|
|
(when devmode? (include-css "/css/devmode.css"))]
|
|
|
|
[:body
|
|
|
|
[:body
|
|
|
|
[:section.grid
|
|
|
|
[:section.grid
|
|
|
|
[:header
|
|
|
|
[:header
|
|
|
|
[:h1.app-title "wan ijo"
|
|
|
|
[:h1.app-title "wan ijo"
|
|
|
|
(when authed?
|
|
|
|
|
|
|
|
[:small.app-title__hello
|
|
|
|
|
|
|
|
(str "O, " ident)])]
|
|
|
|
|
|
|
|
(when authed?
|
|
|
|
(when authed?
|
|
|
|
[:section.header-content
|
|
|
|
[:small.app-title__hello
|
|
|
|
(btnlink "/schema" "Jaki ijo" "header-content__link")
|
|
|
|
(str "O, " ident)])]
|
|
|
|
(btnlink "/logout" "Lape!" "header-content__link")])]
|
|
|
|
(when authed?
|
|
|
|
[:nav (when authed? "nav")]
|
|
|
|
[:section.header-content
|
|
|
|
(vec (concat [:main] content))
|
|
|
|
(btnlink "/schema" "Jaki ijo" "header-content__link")
|
|
|
|
[:aside (when authed? "aside")]
|
|
|
|
(btnlink "/logout" "Lape!" "header-content__link")])]
|
|
|
|
[:footer
|
|
|
|
[:nav (when authed? "nav")]
|
|
|
|
[:small "Ilo pali e ijo"]]]])))
|
|
|
|
(vec (concat [:main] content))
|
|
|
|
|
|
|
|
[:aside (when authed? "aside")]
|
|
|
|
|
|
|
|
[:footer
|
|
|
|
|
|
|
|
[:small "Ilo pali e ijo"]]]])))
|
|
|
|
|
|
|
|
|
|
|
|
(defn flash-error [content]
|
|
|
|
(defn flash-error [content]
|
|
|
|
[:section.flash--error
|
|
|
|
[:section.flash--error
|
|
|
|