Mercurial > laserkard
diff 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 diff
1.1 --- a/buy_temp.clj Tue Jun 22 22:42:11 2010 -0400 1.2 +++ b/buy_temp.clj Wed Jun 23 01:01:40 2010 -0400 1.3 @@ -3,13 +3,39 @@ 1.4 (:use (compojure.http request servlet session routes) 1.5 (compojure.server jetty) 1.6 (compojure control) 1.7 - (clojure.contrib prxml) 1.8 + (clojure.contrib prxml str-utils duck-streams) 1.9 )) 1.10 1.11 - 1.12 -(defn buy-gen [] 1.13 - "<h1> hi Connie again! </h1>") 1.14 - 1.15 - 1.16 (defn pxml [ & args] 1.17 (with-out-str (apply prxml args))) 1.18 + 1.19 +(defn header [] 1.20 + (pxml [:doctype! "html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""])) 1.21 + 1.22 + 1.23 +(defn buy-gen [] 1.24 + 1.25 + 1.26 + (str 1.27 + (header) 1.28 + (re-gsub 1.29 + #">" ">\n" 1.30 + (pxml 1.31 + [:html {:xmlns "http://www.w3.org/1999/xhtml"} 1.32 + 1.33 + [:head 1.34 + [:meta {:http-equiv "Content-Type" :content "text/html" :charset "UTF-8"}] 1.35 + [:link {:rel "stylesheet" :href "main.css" :type "text/css" :media "screen"}] 1.36 + [:link {:rel "stylesheet" :href "old_sexy.css" :type "text/css" :media "screen"}] 1.37 + [:link {:rel "stylesheet" :href "faq.css" :type "text/css" :media "screen"}] 1.38 + ] 1.39 + [:body 1.40 + [:raw! (slurp "/home/r/Desktop/web/laserkard/top_menu.include")] 1.41 + [:div {:class "whole"} 1.42 + [:div {:id "pokedex"} 1.43 + [:p "We have run out of supplies. LaserKards will be 1.44 + available shortly once additional materials have arrived!"]]]]] 1.45 + )))) 1.46 + 1.47 + 1.48 +