Browse Source

simple landing & /new page added

master
Christian Mueller 14 years ago
parent
commit
f8ffca0e6e
  1. 30
      src/NoteHub/views/common.clj
  2. 14
      src/NoteHub/views/pages.clj

30
src/NoteHub/views/common.clj

@ -5,7 +5,8 @@ @@ -5,7 +5,8 @@
(defn gen-comma-list [fonts] (apply str (interpose "," fonts)))
(def global-css (css
(def global-css
(css
(rule ".centerized"
:text-align :center)
(rule ".helvetica-neue"
@ -16,7 +17,9 @@ @@ -16,7 +17,9 @@
"'Lucida Grande'"
"sans-serif"]))
(rule "button"
:margin :2em
:cursor :hand
:box-shadow [0 :2px :5px :#aaa]
:margin-top :1em
:font-size :1.5em
:background :#0a2
:color :white
@ -30,12 +33,24 @@ @@ -30,12 +33,24 @@
(rule "#hero"
:padding-top :5em
:padding-bottom :5em
:border-bottom [:1px :solid :gray]
:text-align :center)
(rule "#body"
(rule ".article-font"
:font-family :Georgia
: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"
:width "1000px")
:margin-right "auto")
(rule "h1, h2, h3, h4" :font-family "'Noticia Text'")))
(defpartial layout [& content]
@ -46,5 +61,4 @@ @@ -46,5 +61,4 @@
:rel "stylesheet"
:type "text/css"}]
[:style {:type "text/css"} global-css]]
[:body
content]))
[:body content]))

14
src/NoteHub/views/pages.clj

@ -1,16 +1,18 @@ @@ -1,16 +1,18 @@
(ns NoteHub.views.pages
(:require [NoteHub.views.common :as common])
(:use [noir.core :only [defpage]]
[hiccup.core :only [html]]))
[hiccup.core :only [html]]
[hiccup.form]))
(defpage "/" []
(common/layout
[: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"])]]))
[:button.helvetica-neue {:onclick "window.location='/new'"} "New Page"]]))
(defpage "/new" []
(common/layout
[:div.central-body.max-width
(text-area {:class "central-body max-width"} :article-write)]))

Loading…
Cancel
Save