simple landing & /new page added
This commit is contained in:
@@ -5,38 +5,53 @@
|
|||||||
|
|
||||||
(defn gen-comma-list [fonts] (apply str (interpose "," fonts)))
|
(defn gen-comma-list [fonts] (apply str (interpose "," fonts)))
|
||||||
|
|
||||||
(def global-css (css
|
(def global-css
|
||||||
(rule ".centerized"
|
(css
|
||||||
:text-align :center)
|
(rule ".centerized"
|
||||||
(rule ".helvetica-neue"
|
:text-align :center)
|
||||||
:font-weight 300
|
(rule ".helvetica-neue"
|
||||||
:font-family (gen-comma-list ["'Helvetica Neue'"
|
:font-weight 300
|
||||||
"Helvetica"
|
:font-family (gen-comma-list ["'Helvetica Neue'"
|
||||||
"Arial"
|
"Helvetica"
|
||||||
"'Lucida Grande'"
|
"Arial"
|
||||||
"sans-serif"]))
|
"'Lucida Grande'"
|
||||||
(rule "button"
|
"sans-serif"]))
|
||||||
:margin :2em
|
(rule "button"
|
||||||
:font-size :1.5em
|
:cursor :hand
|
||||||
:background :#0a2
|
:box-shadow [0 :2px :5px :#aaa]
|
||||||
:color :white
|
:margin-top :1em
|
||||||
:border :none
|
:font-size :1.5em
|
||||||
:border-radius :10px
|
:background :#0a2
|
||||||
:padding :10px)
|
:color :white
|
||||||
(rule "html, body"
|
:border :none
|
||||||
:color :#333
|
:border-radius :10px
|
||||||
:margin 0
|
:padding :10px)
|
||||||
:padding 0)
|
(rule "html, body"
|
||||||
(rule "#hero"
|
:color :#333
|
||||||
:padding-top :5em
|
:margin 0
|
||||||
:padding-bottom :5em
|
:padding 0)
|
||||||
:border-bottom [:1px :solid :gray]
|
(rule "#hero"
|
||||||
:text-align :center)
|
:padding-top :5em
|
||||||
(rule "#body"
|
:padding-bottom :5em
|
||||||
:margin-left "auto"
|
:text-align :center)
|
||||||
:margin-right "auto"
|
(rule ".article-font"
|
||||||
:width "1000px")
|
:font-family :Georgia
|
||||||
(rule "h1, h2, h3, h4" :font-family "'Noticia Text'")))
|
:font-size :1.3em)
|
||||||
|
(rule ".max-width"
|
||||||
|
:width "900px")
|
||||||
|
(rule "*:focus"
|
||||||
|
:outline [:0px :none :transparent])
|
||||||
|
(rule "textarea"
|
||||||
|
:font-family :Courier
|
||||||
|
:font-size :1.3em
|
||||||
|
:border :none
|
||||||
|
:height :600px)
|
||||||
|
(rule ".central-body"
|
||||||
|
:margin-top :5em
|
||||||
|
:margin-bottom :5em
|
||||||
|
:margin-left "auto"
|
||||||
|
:margin-right "auto")
|
||||||
|
(rule "h1, h2, h3, h4" :font-family "'Noticia Text'")))
|
||||||
|
|
||||||
(defpartial layout [& content]
|
(defpartial layout [& content]
|
||||||
(html5
|
(html5
|
||||||
@@ -46,5 +61,4 @@
|
|||||||
:rel "stylesheet"
|
:rel "stylesheet"
|
||||||
:type "text/css"}]
|
:type "text/css"}]
|
||||||
[:style {:type "text/css"} global-css]]
|
[:style {:type "text/css"} global-css]]
|
||||||
[:body
|
[:body content]))
|
||||||
content]))
|
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
(ns NoteHub.views.pages
|
(ns NoteHub.views.pages
|
||||||
(:require [NoteHub.views.common :as common])
|
(:require [NoteHub.views.common :as common])
|
||||||
(:use [noir.core :only [defpage]]
|
(:use [noir.core :only [defpage]]
|
||||||
[hiccup.core :only [html]]))
|
[hiccup.core :only [html]]
|
||||||
|
[hiccup.form]))
|
||||||
|
|
||||||
(defpage "/" []
|
(defpage "/" []
|
||||||
(common/layout
|
(common/layout
|
||||||
[:div#hero
|
[:div#hero
|
||||||
[:h1 "NoteHub"]
|
[:h1 "NoteHub"]
|
||||||
[:h2.helvetica-neue "Free hosting for markdown pages."]
|
[:h2.helvetica-neue "Free hosting for markdown pages."]
|
||||||
[:button.helvetica-neue "Create Page"]]
|
[:button.helvetica-neue {:onclick "window.location='/new'"} "New Page"]]))
|
||||||
[:div#body
|
|
||||||
[:p.centerized.helvetica-neue
|
(defpage "/new" []
|
||||||
(interpose (repeat 10 " ")
|
(common/layout
|
||||||
["About" "How to use" "Impressum"])]]))
|
[:div.central-body.max-width
|
||||||
|
(text-area {:class "central-body max-width"} :article-write)]))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user