several layout improvements + js with a listener extended

This commit is contained in:
Christian Mueller
2012-05-26 11:45:46 +02:00
parent 68adc3aafa
commit 8827287f2a
3 changed files with 45 additions and 14 deletions
+14 -6
View File
@@ -18,16 +18,17 @@
"Arial"
"'Lucida Grande'"
"sans-serif"]))
(rule "button"
:cursor :hand
(rule ".button"
:box-shadow [0 :2px :5px :#aaa]
:margin-top :1em
:text-decoration :none
:font-size :1.5em
:background :#0a2
:color :white
:border :none
:border-radius :10px
:padding :10px)
:padding :10px
(rule "&:hover"
:background :#0b2))
(rule "html, body"
:color :#333
:margin 0
@@ -48,6 +49,13 @@
:font-size :1.3em
:border :none
:height :600px)
(rule ".form-button"
:display :none
:cursor :pointer
:border [:1px :solid]
:background :white
:font-size :0.8em
:opacity :0.8)
(rule ".central-body"
:margin-top :5em
:margin-bottom :5em
@@ -55,10 +63,10 @@
:margin-right "auto")
(rule "h1, h2, h3, h4" :font-family "'Noticia Text'")))
(defpartial layout [& content]
(defpartial layout [title & content]
(html5
[:head
[:title "NoteHub"]
[:title "NoteHub - " title]
[:link {:href "http://fonts.googleapis.com/css?family=Noticia+Text:400,700"
:rel "stylesheet"
:type "text/css"}]
+7 -5
View File
@@ -1,18 +1,20 @@
(ns NoteHub.views.pages
(:require [NoteHub.views.common :as common])
(:use [noir.core :only [defpage]]
[hiccup.core :only [html]]
[hiccup.form]))
(defpage "/" []
(common/layout
(common/layout "Free Markdown Hosting"
[:div#hero
[:h1 "NoteHub"]
[:h2.helvetica-neue "Free hosting for markdown pages."]
[:button.helvetica-neue {:onclick "window.location='/new'"} "New Page"]]))
[:br]
[:br]
[:a.button.helvetica-neue {:href "/new"} "New Page"]]))
(defpage "/new" []
(common/layout
(common/layout "New Markdown Note"
[:div.central-body.max-width
(text-area {:class "central-body max-width"} :write-textarea)]))
(text-area {:class "max-width"} :write-textarea)
(submit-button {:class "helvetica-neue form-button"} "Publish")]))