-
-
Save bhenry/3856e1889084a52a8db2 to your computer and use it in GitHub Desktop.
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 characters
;;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)}]])) |
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 characters
;;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)}]])) |
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 characters
;;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