;; Static file definitions
(def screen-css {:Type :CSS :Filename "screen.css"})
(def print-css {:Type :CSS :Filename "print-css"})
  
;; Static/media files info
(def static-media-url "http://media.yukmarks.com")
(def css-path (str static-media-url "/css/blueprint"))
(def js-path (str static-media-url "/js"))
(def jquery-url "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js")
(def includes [{:jquery (include-js jquery-url)
                :screen (include-css (make-static-path screen-css))
                :print (include-css (make-static-path print-css))}])

(defn make-static-path [fmap]
  "Return an absolute path to static media based on filetype."
  (cond (= (:Type fmap) :CSS)
        (apply str (interpose "/" [css-path (:Filename fmap)]))
        (= (:Type fmap) :JS)
        (apply str (interpose "/" [js-path (:Filename fmap)]))))

Generated by matt using scpaste at Sat Nov 5 02:34:17 2011. EDT. (original)