Skip to content

Instantly share code, notes, and snippets.

@bhenry bhenry/1old.clj Secret
Last active Dec 31, 2015

Embed
What would you like to do?
;;used this way in fermata
(defpartial progress [x y]
(let [responded (progress-percent x y)
unresponded (- 100 responded)
width (fn [v] {:width (str v "%")})]
[:div.progress.progress-striped
[:div.bar.bar-responded {:style (width responded)}]
[:div.bar.bar-unresponded {:style (width unresponded)}]]))
;;had to rewrite it this way in monolith
(defpartial progress [x y]
(let [responded (progress-percent x y)
unresponded (- 100 responded)
width (fn [v] (str "width:" v "%;"))]
[:div.progress.progress-striped
[:div.bar.bar-responded {:style (width responded)}]
[:div.bar.bar-unresponded {:style (width unresponded)}]]))
;;RUNNING IN MONOLITH
;;old renders as
style="{:width "9%"}"
;;new renders as
style="width:9%;"
;;RUNNING IN FERMATA
;;both render as
style="width:9%;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.