ui and code style tweaks

integration-tests
Josha von Gizycki 6 years ago
parent 39c1b06ff5
commit d56f20dab3

@ -146,6 +146,14 @@ form {
} }
} }
form.inline {
display: inline-grid;
input {
grid-column: 1 / span 2;
}
}
table { table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;

@ -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

@ -33,4 +33,4 @@
(GET "/schema" [] view-schema/overview!) (GET "/schema" [] view-schema/overview!)
(GET "/schema/:uuid" [uuid :as req] (show-schema! uuid (:session req))) (GET "/schema/:uuid" [uuid :as req] (show-schema! uuid (:session req)))
(POST "/schema/new" [] new!) (POST "/schema/new" [] new!)
(DELETE "/schema/:uuid/delete" [uuid :as req] (delete-schema! uuid (:session req)))) (DELETE "/schema/:uuid" [uuid :as req] (delete-schema! uuid (:session req))))

@ -50,6 +50,7 @@
[:li (:name attr)])] [:li (:name attr)])]
[:h2 "Mute pali"] [:h2 "Mute pali"]
(hform/form-to (hform/form-to
[:delete (str "/schema/" (:uuid schema) "/delete")] {:class "inline"}
[:delete (str "/schema/" (:uuid schema))]
(anti-forgery-field) (anti-forgery-field)
(hform/submit-button "Pakala!"))])) (hform/submit-button "Pakala!"))]))

Loading…
Cancel
Save