diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-02-18 20:00:54 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-02-18 20:00:54 +0100 |
commit | 1e7decfcda6029d3dfe8032e85d9e20f728d3dbd (patch) | |
tree | 7201e4a54996b24700184b67342b1fcefd47c032 /cljssss-g.clj | |
parent | 54c04f85adb6938ef9ef27b5d7a1ab592fb30461 (diff) |
Use StringTemplate for web page generation.
Diffstat (limited to 'cljssss-g.clj')
-rw-r--r-- | cljssss-g.clj | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cljssss-g.clj b/cljssss-g.clj index 6987a56..f5c4775 100644 --- a/cljssss-g.clj +++ b/cljssss-g.clj @@ -1,17 +1,16 @@ (ns cljssss-g - (require [net.cgrand.enlive-html :as enlive] - [clojure.xml :as xml] + (require [clojure.xml :as xml] compojure) + (import (org.antlr.stringtemplate StringTemplateGroup)) (use compojure)) +(def tgroup (new StringTemplateGroup "")) + (defservlet cljssss-g (GET "/" - (html [:html - [:head - [:title "Gödel-Gentzen Clojure Syndication Services Super System"]] - [:body - [:h1 "Gödel-Gentzen Clojure Syndication Services Super System"] - [:p "Fnord."]]])) + (.toString + (doto (.getInstanceOf tgroup "index") + (.setAttributes {"title" "Subscriptions"})))) (ANY "*" (page-not-found))) |