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