view faq.clj @ 106:5b0753c6f34d laserkard tip

updated to newest compojure and a simpler syntax
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 20:22:58 -0400
parents 4ebd94bfecda
children
line wrap: on
line source
1 (ns laserkard.faq
2 (:use (clojure.contrib prxml [str-utils :only [re-gsub]] [seq-utils :only [indexed]] )
3 (laserkard common)))
5 (def faqs
6 [
8 ["Will I have enough cards?"]
9 ["We like to think of these cards as sniper bullets - throw your cheap paper business cards at everyone like shotgun rounds, but use your Laserkard when it really matters. Save these cards for the big boys - Laserkards will rock their world."]
11 ["How thick are the cards? Will they fit in my wallet and Rolodex?"]
12 ["Laserkards are 16 thousandths of an inch - a human hair thicker than a normal paper business card and about half as thick as a plastic credit card. They fit very well into your wallet and even better in your hand. They'll fit in a Rolodex, but they don't belong in one " [:a {:href "http://www.youtube.com/watch?v=4YBxeDN4tbk#t=1m23s"} ":)"]]
14 ["How are they made?"]
15 ["We start with aluminum blanks punched from a sheet of anodized aluminum. Then, we use a high power YAG laser to etch your custom text and designs. The resulting card looks as if your information is printed in silver on the colored aluminum."]
17 ["Do they stay clean?"]
18 ["Yes. They're waterproof and very scratch resistant. They last much longer than a paper business card."]
20 ["Are the edges sharp?"]
21 ["No. The edges are rounded and will not cut into skin."]
23 ["How can I get my logo on the card? Can I get my own design onto the card?"]
24 ["For custom designs, " [:a {:href "mailto:sales@laserkard.com"} "contact"] "us. We can work with you to have your cards in the mail to you within two weeks of your first email."]
26 ["Who are the designers?"]
27 ["Three MIT graduates are the heart, brains and soul behind Laserkard. We think you'll appreciate our product engineering and business backgrounds when you give out your own Laserkards."]
30 ])
33 (def head
34 [:head
35 [:meta {:http-equiv "Content-Type" :content "text/html" :charset "UTF-8"}]
36 [:link {:rel "stylesheet" :href "css/main.css" :type "text/css" :media "screen"}]
37 [:link {:rel "stylesheet" :href "css/old_sexy.css" :type "text/css" :media "screen"}]
38 [:link {:rel "stylesheet" :href "css/faq.css" :type "text/css" :media "screen"}]
39 [:title "Laserkard | FAQ"]
41 ])
44 (def filler
45 [:div {:id "garbage"} "&nbsp"])
48 (defn faq-wrap [vect]
49 (apply vector (cons :div (map (fn [[index content]]
50 (if
51 (odd? index)
52 (eval `(vector :p {:class "answer"} ~@content))
53 (eval `(vector :p {:class "question"} ~@content))))
54 (indexed vect)))))
56 (defn faq []
57 (header)
58 (re-gsub
59 #">" ">\n"
61 (pxml
62 [:html
63 head
64 [:body {:id "faq"}
65 [:raw! (slurp "/home/r/Desktop/web/laserkard/top_menu.include")]
66 [:h1 "Frequently Asked Questions"]
67 [:div {:class "whole"}
68 [:div {:id "pokedex"}
69 (faq-wrap faqs)
70 ]]
71 filler
72 ]])))