From c9afa031a2a4e3e33e9b76bd8073b622fcde2452 Mon Sep 17 00:00:00 2001 From: Christian Mueller Date: Tue, 22 May 2012 22:23:17 +0200 Subject: [PATCH] landing finished --- README.md | 2 +- project.clj | 3 ++- src/NoteHub/views/common.clj | 48 ++++++++++++++++++++++++++++++------ src/NoteHub/views/pages.clj | 9 ++++++- 4 files changed, 52 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b87a8a7..3b50b44 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # NoteHub -NoteHub is a free and anonymous hosting of markdown pages. It can be used for publishing of formated text. For instance, this service might be interesting for people, who want to publish something, but don't want to start a blog. +NoteHub is a free and anonymous hosting for markdown pages. It can be used for publishing of markdown-formatted text. For instance, this service might be interesting to people, who want to publish something, but don't want to start a blog. ## Writing diff --git a/project.clj b/project.clj index f2b98bf..b902030 100644 --- a/project.clj +++ b/project.clj @@ -1,7 +1,8 @@ (defproject NoteHub "0.1.0-SNAPSHOT" :description "A free and anonymous hosting for markdown pages." :dependencies [[org.clojure/clojure "1.4.0"] + [hiccup "1.0.0"] [cssgen "0.2.6"] - [noir "1.2.1"]] + [noir "1.3.0-beta1"]] :main NoteHub.server) diff --git a/src/NoteHub/views/common.clj b/src/NoteHub/views/common.clj index c6e5a08..65aa197 100644 --- a/src/NoteHub/views/common.clj +++ b/src/NoteHub/views/common.clj @@ -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])) diff --git a/src/NoteHub/views/pages.clj b/src/NoteHub/views/pages.clj index 945c8b1..caf6e75 100644 --- a/src/NoteHub/views/pages.clj +++ b/src/NoteHub/views/pages.clj @@ -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 " ") + ["About" "How to use" "Impressum"])]]))