Commit 491b251f authored by Davide Taviani's avatar Davide Taviani

minor fixes to styling

parent 2192df06
html {
background-color: #fafafa;
}
.container {
background: white;
margin: 20px auto;
border-radius: 10px;
padding: 20px;
}
.board {
border: 1px solid #DDD;
margin: 50px;
......
......@@ -13,17 +13,19 @@
(html5
[:head
[:meta {:charset "utf-8"}]
#_(include-css "//opensource.keycdn.com/fontawesome/4.7.0/font-awesome.min.css")
#_(include-js "//use.fontawesome.com/cc5c5d5215.js")
#_(include-css "/css/bulma.css")
(include-css "//cdnjs.cloudflare.com/ajax/libs/bulma/0.4.3/css/bulma.min.css")
[:meta {:name "viewport"
:content "width=device-width, initial-scale=1"}]
(include-js "//use.fontawesome.com/releases/v5.0.7/js/all.js")
(include-css "//cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css")
(include-css "/css/screen.css")]
[:body
[:div {:class "container"}
[:nav {:class "navbar"}
[:div {:class "navbar-menu"}
[:div {:class "navbar-start"}
[:a {:class "navbar-item" :href "/"} "Home"]
[:a {:class "navbar-item" :href "/"} [:span {:class "icon"}
[:i {:class "fas fa-home"}]]
[:span "Home"]]
[:a {:class "navbar-item" :href "/new"} "New"]]]]
content]]))
......
......@@ -16,7 +16,7 @@
(defn list-page []
(html-utils/layout
(let [levels (db/list-levels)]
[:table {:class "table"}
[:table {:class "table is-fullwidth"}
[:thead
[:tr
[:th "ID"]
......@@ -28,14 +28,17 @@
[:td (str (:id level))]
[:td (str (:size level))]
[:td
[:a {:class "button is-primary"
:href (str "/play/" (:id level))}
"Play"]
[:a {:class "button is-info"
:href (str "/edit/" (:id level))}
"Edit"]
(form/form-to [:post (str "/delete/" (:id level))]
[:input {:class "button is-danger" :type :submit :value "Delete"}])]])]])))
[:div {:class "field has-addons"}
[:a {:class "button is-primary is-outlined"
:href (str "/play/" (:id level))}
"Play"]
[:a {:class "button is-info is-outlined"
:href (str "/edit/" (:id level))}
"Edit"]
(form/form-to [:post (str "/delete/" (:id level))]
[:input {:class "button is-danger is-outlined"
:type :submit
:value "Delete"}])]]])]])))
(defroutes routes
(GET "/" req (list-page))
......@@ -57,10 +60,10 @@
(POST "/create-level" {:keys [body]}
(when (db/create! (assoc body :id (UUID/randomUUID)))
{:status 200
:body {:saved? true}}))
:body {:saved? true}}))
(GET "/load-stuff" [] {:status 200
:body {:something "here"}})
:body {:something "here"}})
(route/resources "/")
(route/not-found "Not found"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment