Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pom.xml | ||
*jar | ||
/lib/ | ||
/classes/ | ||
.lein-deps-sum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# examplenoir | ||
|
||
A website written in noir. | ||
|
||
## Usage | ||
|
||
```bash | ||
lein deps | ||
lein run | ||
``` | ||
|
||
## License | ||
|
||
Copyright (C) 2011 FIXME | ||
|
||
Distributed under the Eclipse Public License, the same as Clojure. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(defproject examplenoir "0.1.0-SNAPSHOT" | ||
:description "FIXME: write this!" | ||
:dependencies [[org.clojure/clojure "1.3.0"] | ||
[noir "1.2.1"]] | ||
:main examplenoir.server) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
html { | ||
margin:0; | ||
padding:0; | ||
border:0; | ||
} | ||
|
||
body, div, span, object, iframe, | ||
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
a, abbr, acronym, address, code, | ||
del, dfn, em, img, q, dl, dt, dd, ol, ul, li, | ||
fieldset, form, label, legend, | ||
table, caption, tbody, tfoot, thead, tr, th, td, | ||
article, aside, dialog, figure, footer, header, | ||
hgroup, nav, section { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font-weight: inherit; | ||
font-style: inherit; | ||
font-size: 100%; | ||
font-family: inherit; | ||
vertical-align: baseline; | ||
} | ||
|
||
article, aside, dialog, figure, footer, header, | ||
hgroup, nav, section { | ||
display:block; | ||
} | ||
|
||
body { | ||
line-height: 1.5; | ||
background: white; | ||
} | ||
|
||
table { | ||
border-collapse: separate; | ||
border-spacing: 0; | ||
} | ||
|
||
caption, th, td { | ||
text-align: left; | ||
font-weight: normal; | ||
float:none !important; | ||
} | ||
table, th, td { | ||
vertical-align: middle; | ||
} | ||
|
||
blockquote:before, blockquote:after, q:before, q:after { content: ''; } | ||
blockquote, q { quotes: "" ""; } | ||
|
||
a img { border: none; } | ||
|
||
/*:focus { outline: 0; }*/ | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(ns examplenoir.server | ||
(:require [noir.server :as server])) | ||
|
||
(server/load-views "src/examplenoir/views/") | ||
|
||
(defn -main [& m] | ||
(let [mode (keyword (or (first m) :dev)) | ||
port (Integer. (get (System/getenv) "PORT" "8080"))] | ||
(server/start port {:mode mode | ||
:ns 'examplenoir}))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(ns examplenoir.views.common | ||
(:use [noir.core :only [defpartial]] | ||
[hiccup.page-helpers :only [include-css html5]])) | ||
|
||
(defpartial layout [& content] | ||
(html5 | ||
[:head | ||
[:title "examplenoir"] | ||
(include-css "/css/reset.css")] | ||
[:body | ||
[:div#wrapper | ||
content]])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(ns examplenoir.views.welcome | ||
(:require [examplenoir.views.common :as common] | ||
[noir.content.getting-started]) | ||
(:use [noir.core :only [defpage]] | ||
[hiccup.core :only [html]])) | ||
|
||
(defpage "/welcome" [] | ||
(common/layout | ||
[:p "Welcome to examplenoir"])) |