Permalink
Browse files

init

  • Loading branch information...
0 parents commit 0d25f4d06c065be56afbc1fbae89218c39d55453 @gnarmis committed Jul 4, 2012
@@ -0,0 +1,5 @@
+pom.xml
+*jar
+/lib/
+/classes/
+.lein-deps-sum
@@ -0,0 +1,17 @@
+# korma-lobos-tpl
+
+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.
+
@@ -0,0 +1,8 @@
+(defproject korma-lobos-tpl "0.1.0-SNAPSHOT"
+ :description "A template integrating Korma and Lobos"
+ :dependencies [[org.clojure/clojure "1.3.0"]
+ [noir "1.2.1"]
+ [korma "0.3.0-beta7"]
+ [lobos "0.8.0"]]
+ :main korma-lobos-tpl.server)
+
@@ -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; }*/
+
+
+
@@ -0,0 +1,9 @@
+(ns korma-lobos-tpl.models.dbspec
+ (:require [clojure.string :as string])
+ (:use [korma.db]))
+
+; development database
+(defdb dev
+ (mysql {:db *db-name*
+ :user *db-user*
+ :password *db-password*}))
@@ -0,0 +1,11 @@
+(ns korma-lobos-tpl.server
+ (:require [noir.server :as server]))
+
+(server/load-views "src/korma_lobos_tpl/views/")
+
+(defn -main [& m]
+ (let [mode (keyword (or (first m) :dev))
+ port (Integer. (get (System/getenv) "PORT" "8080"))]
+ (server/start port {:mode mode
+ :ns 'korma-lobos-tpl})))
+
@@ -0,0 +1,12 @@
+(ns korma-lobos-tpl.views.common
+ (:use [noir.core :only [defpartial]]
+ [hiccup.page-helpers :only [include-css html5]]))
+
+(defpartial layout [& content]
+ (html5
+ [:head
+ [:title "korma-lobos-tpl"]
+ (include-css "/css/reset.css")]
+ [:body
+ [:div#wrapper
+ content]]))
@@ -0,0 +1,9 @@
+(ns korma-lobos-tpl.views.welcome
+ (:require [korma-lobos-tpl.views.common :as common]
+ [noir.content.getting-started])
+ (:use [noir.core :only [defpage]]
+ [hiccup.core :only [html]]))
+
+(defpage "/welcome" []
+ (common/layout
+ [:p "Welcome to korma-lobos-tpl"]))

0 comments on commit 0d25f4d

Please sign in to comment.