add page footer
This commit is contained in:
parent
23ebc7edf0
commit
058d587903
|
@ -1,3 +1,30 @@
|
|||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
min-height: 100%;
|
||||
height: auto !important;
|
||||
height: 100%;
|
||||
margin: 0 auto -60px;
|
||||
}
|
||||
|
||||
#push, #footer {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
#app-body {
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
#footer .content {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
div.popover.card-image {
|
||||
max-width: none;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
(ns mtgcoll.routes.main-page
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[compojure.core :refer [routes GET POST]]
|
||||
[hiccup.page :refer [include-css include-js]]
|
||||
[hiccup.element :refer [javascript-tag]]
|
||||
[webtools.page :refer [html5 js-env-settings]]
|
||||
[webtools.reagent.page :refer [include-bootstrap-metatags include-bootstrap-css]]
|
||||
[mtgcoll.config :as config]))
|
||||
[mtgcoll.config :as config])
|
||||
(:use
|
||||
mtgcoll.utils))
|
||||
|
||||
(defn main-page
|
||||
[request]
|
||||
|
@ -16,7 +19,15 @@
|
|||
(include-bootstrap-css true)
|
||||
(include-css "css/app.css")]
|
||||
[:body
|
||||
[:div#wrap
|
||||
[:div#app [:h1 "Please wait, loading ..."]]
|
||||
[:div#push]]
|
||||
[:div#footer
|
||||
[:div.container-fluid
|
||||
[:div.content.text-center.text-muted
|
||||
"mtgcoll " (get-app-version) " | "
|
||||
[:a {:href "https://github.com/gered/mtgcoll"} "Source code"] " licensed under MIT."]
|
||||
]]
|
||||
(js-env-settings "" (boolean (config/get :dev?)))
|
||||
(include-js "cljs/app.js")]))
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
[clj-http.client :as http])
|
||||
(:import
|
||||
(java.io ByteArrayInputStream InputStream)
|
||||
(java.text Normalizer Normalizer$Form)))
|
||||
(java.text Normalizer Normalizer$Form)
|
||||
(java.util Properties)))
|
||||
|
||||
(def chrome-osx-request-headers
|
||||
{"User-Agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36"
|
||||
|
@ -57,3 +58,14 @@
|
|||
(if (< (count s) n)
|
||||
(->> (repeat c) (concat s) (take n) (string/join))
|
||||
s)))
|
||||
|
||||
(defn get-app-version
|
||||
[]
|
||||
(if-let [version (System/getProperty "mtgcoll.version")]
|
||||
version
|
||||
(-> (doto (Properties.)
|
||||
(.load (-> "META-INF/maven/%s/%s/pom.properties"
|
||||
(format "mtgcoll" "mtgcoll")
|
||||
(io/resource)
|
||||
(io/reader))))
|
||||
(.get "version"))))
|
||||
|
|
Loading…
Reference in a new issue