fixing percentages.

This commit is contained in:
Bryce Covert
2020-06-24 07:47:26 -07:00
parent d4559a7c2d
commit 3de59d3fdc
6 changed files with 119 additions and 31 deletions

View File

@@ -28,6 +28,17 @@
(defn- nf%
[num]
(.format (doto
(NumberFormat. Format/PERCENT)
(.setMaximumFractionDigits 1)
(.setMinimumFractionDigits 1))
(str num)))
(defn ->% [x]
(nf% x))
(defn active-when= [active-page candidate]
(when (= active-page candidate) " is-active"))