view buy_temp.clj @ 72:83b0419c7979 laserkard

implemented temporary buy page in clojure
author Robert McIntyre <rlm@mit.edu>
date Wed, 23 Jun 2010 01:01:40 -0400
parents ad52bd1a084b
children 5fb0e5db5926
line wrap: on
line source
1 (ns laserkard.buy-temp
3 (:use (compojure.http request servlet session routes)
4 (compojure.server jetty)
5 (compojure control)
6 (clojure.contrib prxml str-utils duck-streams)
7 ))
9 (defn pxml [ & args]
10 (with-out-str (apply prxml args)))
12 (defn header []
13 (pxml [:doctype! "html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""]))
16 (defn buy-gen []
19 (str
20 (header)
21 (re-gsub
22 #">" ">\n"
23 (pxml
24 [:html {:xmlns "http://www.w3.org/1999/xhtml"}
26 [:head
27 [:meta {:http-equiv "Content-Type" :content "text/html" :charset "UTF-8"}]
28 [:link {:rel "stylesheet" :href "main.css" :type "text/css" :media "screen"}]
29 [:link {:rel "stylesheet" :href "old_sexy.css" :type "text/css" :media "screen"}]
30 [:link {:rel "stylesheet" :href "faq.css" :type "text/css" :media "screen"}]
31 ]
32 [:body
33 [:raw! (slurp "/home/r/Desktop/web/laserkard/top_menu.include")]
34 [:div {:class "whole"}
35 [:div {:id "pokedex"}
36 [:p "We have run out of supplies. LaserKards will be
37 available shortly once additional materials have arrived!"]]]]]
38 ))))