From 55359aa594703eb0102bcf8eb9b54ead871c722a Mon Sep 17 00:00:00 2001 From: Christian Mueller Date: Mon, 21 May 2012 22:34:08 +0200 Subject: [PATCH] gencss lib added --- project.clj | 3 ++- src/NoteHub/views/common.clj | 6 +++++- src/NoteHub/views/pages.clj | 9 +++++++++ src/NoteHub/views/welcome.clj | 9 --------- 4 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 src/NoteHub/views/pages.clj delete mode 100644 src/NoteHub/views/welcome.clj diff --git a/project.clj b/project.clj index 1fd4a5d..f2b98bf 100644 --- a/project.clj +++ b/project.clj @@ -1,6 +1,7 @@ (defproject NoteHub "0.1.0-SNAPSHOT" :description "A free and anonymous hosting for markdown pages." - :dependencies [[org.clojure/clojure "1.3.0"] + :dependencies [[org.clojure/clojure "1.4.0"] + [cssgen "0.2.6"] [noir "1.2.1"]] :main NoteHub.server) diff --git a/src/NoteHub/views/common.clj b/src/NoteHub/views/common.clj index b2551f1..c6e5a08 100644 --- a/src/NoteHub/views/common.clj +++ b/src/NoteHub/views/common.clj @@ -1,12 +1,16 @@ (ns NoteHub.views.common (:use [noir.core :only [defpartial]] [hiccup.page-helpers :only [include-css html5]])) +(use 'cssgen) (defpartial layout [& content] (html5 [:head [:title "NoteHub"] - (include-css "/css/reset.css")] + [:style {:type "text/css"} + (css (rule "h1" :font-family "Impact"))] + ] [:body + ; TODO: replace wrapper with smth [:div#wrapper content]])) diff --git a/src/NoteHub/views/pages.clj b/src/NoteHub/views/pages.clj new file mode 100644 index 0000000..945c8b1 --- /dev/null +++ b/src/NoteHub/views/pages.clj @@ -0,0 +1,9 @@ +(ns NoteHub.views.pages + (:require [NoteHub.views.common :as common]) + (:use [noir.core :only [defpage]] + [hiccup.core :only [html]])) + +(defpage "/" [] + (common/layout + [:h1 "Welcome to NoteHub"])) + diff --git a/src/NoteHub/views/welcome.clj b/src/NoteHub/views/welcome.clj deleted file mode 100644 index f9f07c8..0000000 --- a/src/NoteHub/views/welcome.clj +++ /dev/null @@ -1,9 +0,0 @@ -(ns NoteHub.views.welcome - (:require [NoteHub.views.common :as common] - [noir.content.getting-started]) - (:use [noir.core :only [defpage]] - [hiccup.core :only [html]])) - -(defpage "/welcome" [] - (common/layout - [:p "Welcome to NoteHub"]))