Disable link to current page

This commit is contained in:
Akira Tempaku 2025-05-05 02:07:41 +09:00
parent a1517013f3
commit 20b669c96a
Signed by: paku
GPG key ID: 5B4E8402BCC50607

View file

@ -19,7 +19,7 @@
(ul :preload "mouseover" :class "flex gap-4 text-xl font-medium"
(loop
:for (href label) :in *nav-menu* :collect
(if (search href (request-uri *request*))
(if (string= href (request-uri *request*))
(hsx (li :class "text-pink-500" label))
(hsx (li (a :href href :class "hover:text-pink-500" label))))))))))
@ -60,7 +60,9 @@
:class "flex flex-col h-fit gap-8 text-3xl font-medium"
(loop
:for (href label) :in (append '(("/" "home")) *nav-menu*) :collect
(hsx (li (a :href href label))))))))))
(if (string= href (request-uri *request*))
(hsx (li :class "text-pink-500" label))
(hsx (li (a :href href :class "hover:text-pink-500" label)))))))))))
(defcomp ~header ()
(hsx