I'm rewriting my History of the World website (history.clmitchell.net) in clojure and making great progress. I've reached the point where I need to use a conditional to output hiccup code for declaring CSS links based on which page I'm loading. I've pored over the docs but can't figure this out:
(defn cssfiles
"load sets of CSS files depending on which page is being served"
[pageName]
(condp = pageName
"index" (hic/include-css "/css/hcspry.css"
"/css/menus.css"
"/css/filter.css"
"/css/wc3xhtml1.css")
"add" (hic/include-css "/css/hcspry.css"
"/css/menus.css"
"/css/addform.css")
"map" (hic/include-css "/css/hcspry.css"
"/css/menus.css"
"/css/SpryCollapsiblePanel.css"
"/css/SpryAccordion.css")
"chart" (hic/include-css "/css/hcspry.css"
"/css/menus.css"
"/css/filter.css"
"/css/cha.css")
"learn" (hic/include-css "/css/hcspry.css"
"/css/menus.css"
"/css/filter.css"
"/css/wc3xhtml1.css"
"/css/doc.css")
"changes" (hic/include-css "/css/hcspry.css"
"/css/menus.css"
"/css/filter.css"
"/css/wc3xhtml1.css"
"/css/clg.css")
"seek" (hic/include-css "/css/hcspry.css"
"/css/menus.css"))
(println (str "PRGMR. MSG: net.clm.history.pages.snippets.clj::(defn cssfiles [" pageName "]): unknown parameter or parameter not processed properly.")))
Question: what is the proper syntax for this kind of function?