landing finished

This commit is contained in:
Christian Mueller
2012-05-22 22:23:17 +02:00
parent 55359aa594
commit c9afa031a2
4 changed files with 52 additions and 10 deletions
+41 -7
View File
@@ -1,16 +1,50 @@
(ns NoteHub.views.common
(:use [noir.core :only [defpartial]]
[hiccup.page-helpers :only [include-css html5]]))
[hiccup.page :only [include-css html5]]))
(use 'cssgen)
(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"]
[:style {:type "text/css"}
(css (rule "h1" :font-family "Impact"))]
]
[:link {:href "http://fonts.googleapis.com/css?family=Noticia+Text:400,700"
:rel "stylesheet"
:type "text/css"}]
[:style {:type "text/css"} global-css]]
[:body
; TODO: replace wrapper with smth
[:div#wrapper
content]]))
content]))
+8 -1
View File
@@ -5,5 +5,12 @@
(defpage "/" []
(common/layout
[:h1 "Welcome to NoteHub"]))
[:div#hero
[:h1 "NoteHub"]
[:h2.helvetica-neue "Free hosting for markdown pages."]
[:button.helvetica-neue "Create Page"]]
[:div#body
[:p.centerized.helvetica-neue
(interpose (repeat 10 "&nbsp")
["About" "How to use" "Impressum"])]]))