A pastebin for markdown pages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.9 KiB

(ns NoteHub.views.common
(:use [noir.core :only [defpartial]]
14 years ago
[hiccup.page :only [include-css html5]]))
14 years ago
(use 'cssgen)
14 years ago
(defn gen-comma-list [fonts] (apply str (interpose "," fonts)))
(def global-css (css
(rule ".centerized"
:text-align :center)
(rule ".helvetica-neue"
:font-weight 300
:font-family (gen-comma-list ["'Helvetica Neue'"
"Helvetica"
"Arial"
"'Lucida Grande'"
"sans-serif"]))
(rule "button"
:margin :2em
:font-size :1.5em
:background :#0a2
:color :white
:border :none
:border-radius :10px
:padding :10px)
(rule "html, body"
:color :#333
:margin 0
:padding 0)
(rule "#hero"
:padding-top :5em
:padding-bottom :5em
:border-bottom [:1px :solid :gray]
:text-align :center)
(rule "#body"
:margin-left "auto"
:margin-right "auto"
:width "1000px")
(rule "h1, h2, h3, h4" :font-family "'Noticia Text'")))
(defpartial layout [& content]
(html5
[:head
[:title "NoteHub"]
14 years ago
[:link {:href "http://fonts.googleapis.com/css?family=Noticia+Text:400,700"
:rel "stylesheet"
:type "text/css"}]
[:style {:type "text/css"} global-css]]
[:body
14 years ago
content]))