Created
August 1, 2014 06:31
Revisions
-
dwwoelfel created this gist
Aug 1, 2014 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ (defmacro html [body] `(if-not (:render-colors? initial-query-map) (html/html ~body) (let [body# ~body] (try (let [[tag# & rest#] body# attrs# (if (map? (first rest#)) (first rest#) {}) rest# (if (map? (first rest#)) (rest rest#) rest#)] (html/html (vec (concat [tag# (assoc-in attrs# [:style :border] (str "5px solid rgb(" (rand-int 255) "," (rand-int 255) "," (rand-int 255) ")"))] rest#)))) (catch :default e# (html/html body#))))))