Skip to content

Instantly share code, notes, and snippets.

@minikomi
Created May 8, 2017 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minikomi/12175f0a315b0edc50d52e2f23765f14 to your computer and use it in GitHub Desktop.
Save minikomi/12175f0a315b0edc50d52e2f23765f14 to your computer and use it in GitHub Desktop.
(defmacro build-class
([] "")
([[pred clsname] & remain]
`(str
(if ~pred
(str ~clsname " ")
"")
(build-class ~@remain))))
(h/build-class
[@bg "bg-active"]
[@mobile "mobile"]
[@company "company-active"]
[(and @active-panel (not= :home @active-panel)) (str "panel-active " (name @active-panel))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment