comparison faq.clj @ 75:874a6a2c28cf laserkard

session with nick. redisigned faq page
author Robert McIntyre <rlm@mit.edu>
date Tue, 29 Jun 2010 15:36:30 -0400
parents
children 4ebd94bfecda
comparison
equal deleted inserted replaced
74:24d5d4221b42 75:874a6a2c28cf
1 (ns laserkard.faq
2 (:use (compojure.http request servlet session routes)
3 (compojure.server jetty)
4 (compojure control)
5 (clojure.contrib prxml str-utils duck-streams seq-utils)
6 (laserkard common)))
7
8 (def faqs
9 [
10
11 ["Will I have enough cards?"]
12 ["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."]
13
14 ["How thick are the cards? Will they fit in my wallet and Rolodex?"]
15 ["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"} ":)"]]
16
17 ["How are they made?"]
18 ["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."]
19
20 ["Do they stay clean?"]
21 ["Yes. They're waterproof and very scratch resistant. They last much longer than a paper business card."]
22
23 ["Are the edges sharp?"]
24 ["No. The edges are rounded and will not cut into skin."]
25
26 ["How can I get my logo on the card? Can I get my own design onto the card?"]
27 ["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."]
28
29 ["Who are the designers?"]
30 ["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."]
31
32
33 ])
34
35
36 (def head
37 [:head
38 [:meta {:http-equiv "Content-Type" :content "text/html" :charset "UTF-8"}]
39 [:link {:rel "stylesheet" :href "main.css" :type "text/css" :media "screen"}]
40 [:link {:rel "stylesheet" :href "old_sexy.css" :type "text/css" :media "screen"}]
41 [:link {:rel "stylesheet" :href "faq.css" :type "text/css" :media "screen"}]
42 [:title "Laserkard | FAQ"]
43
44 ])
45
46
47 (def filler
48 [:div {:id "garbage"} "&nbsp"])
49
50
51 (defn faq-wrap [vect]
52 (apply vector (cons :div (map (fn [[index content]]
53 (if
54 (odd? index)
55 (eval `(vector :p {:class "answer"} ~@content))
56 (eval `(vector :p {:class "question"} ~@content))))
57 (indexed vect)))))
58
59 (defn faq []
60 (header)
61 (re-gsub
62 #">" ">\n"
63
64 (pxml
65 [:html
66 head
67 [:body {:id "faq"}
68 [:raw! (slurp "/home/r/Desktop/web/laserkard/top_menu.include")]
69 [:h1 "Frequently Asked Questions"]
70 [:div {:class "whole"}
71 [:div {:id "pokedex"}
72 (faq-wrap faqs)
73 ]]
74 filler
75 ]])))
76
77
78
79