Fix if conditions
This commit is contained in:
parent
6712c2cc47
commit
3f37a36035
1 changed files with 2 additions and 2 deletions
|
@ -14,13 +14,13 @@
|
||||||
(defmacro nav-item (name active url)
|
(defmacro nav-item (name active url)
|
||||||
`(spinneret:with-html
|
`(spinneret:with-html
|
||||||
(:li :class "nav-item"
|
(:li :class "nav-item"
|
||||||
(:a :class ,(if (null active) nil "nav-link active" "nav-link")
|
(:a :class ,(if (null active) "nav-link" "nav-link active")
|
||||||
:href (format nil "#~a" ,url)
|
:href (format nil "#~a" ,url)
|
||||||
,name))))
|
,name))))
|
||||||
|
|
||||||
(defmacro nav ((&key (style nil)) &rest rest)
|
(defmacro nav ((&key (style nil)) &rest rest)
|
||||||
`(spinneret:with-html
|
`(spinneret:with-html
|
||||||
(:ul :class ,(if (null style) nil (concatenate 'string "nav " style) "nav")
|
(:ul :class ,(if (null style) "nav" (concatenate 'string "nav " style))
|
||||||
,@(loop for tab in rest
|
,@(loop for tab in rest
|
||||||
collect (destructuring-bind (&key name active url) tab
|
collect (destructuring-bind (&key name active url) tab
|
||||||
`(nav-item ,name ,active ,url))))))
|
`(nav-item ,name ,active ,url))))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue