Mercurial > laserkard
comparison 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 |
comparison
equal
deleted
inserted
replaced
71:ad52bd1a084b | 72:83b0419c7979 |
---|---|
1 (ns laserkard.buy-temp | 1 (ns laserkard.buy-temp |
2 | 2 |
3 (:use (compojure.http request servlet session routes) | 3 (:use (compojure.http request servlet session routes) |
4 (compojure.server jetty) | 4 (compojure.server jetty) |
5 (compojure control) | 5 (compojure control) |
6 (clojure.contrib prxml) | 6 (clojure.contrib prxml str-utils duck-streams) |
7 )) | 7 )) |
8 | |
9 | |
10 (defn buy-gen [] | |
11 "<h1> hi Connie again! </h1>") | |
12 | |
13 | 8 |
14 (defn pxml [ & args] | 9 (defn pxml [ & args] |
15 (with-out-str (apply prxml args))) | 10 (with-out-str (apply prxml args))) |
11 | |
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\""])) | |
14 | |
15 | |
16 (defn buy-gen [] | |
17 | |
18 | |
19 (str | |
20 (header) | |
21 (re-gsub | |
22 #">" ">\n" | |
23 (pxml | |
24 [:html {:xmlns "http://www.w3.org/1999/xhtml"} | |
25 | |
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 )))) | |
39 | |
40 | |
41 |