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 {
width: 100%;
border-collapse: collapse;

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

@ -33,4 +33,4 @@
(GET "/schema" [] view-schema/overview!)
(GET "/schema/:uuid" [uuid :as req] (show-schema! uuid (:session req)))
(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)])]
[:h2 "Mute pali"]
(hform/form-to
[:delete (str "/schema/" (:uuid schema) "/delete")]
{:class "inline"}
[:delete (str "/schema/" (:uuid schema))]
(anti-forgery-field)
(hform/submit-button "Pakala!"))]))

Loading…
Cancel
Save