Remove bg, add header

This commit is contained in:
Akira Tempaku 2025-05-02 01:31:26 +09:00
commit 9503b56084
Signed by: paku
GPG key ID: 5B4E8402BCC50607
2 changed files with 37 additions and 27 deletions
src/components

View file

@ -0,0 +1,28 @@
(defpackage #:hp/components/header
(:use #:cl
#:hsx)
(:import-from #:jingle
#:request-uri)
(:export #:~header))
(in-package #:hp/components/header)
(defparameter *nav-menu*
'(("/bio" "bio")
("/work" "work")
("/blog" "blog")))
(defcomp ~header ()
(hsx
(header :class "flex justify-between pb-2 md:pb-4 border-b-1"
(h1 :class "text-2xl md:text-3xl font-bold"
(a :href "/"
"skyizwhite"))
(nav :class "flex items-end"
(ul :preload "mouseover" :class "flex gap-4 text-lg"
(loop
:for (href label) :in *nav-menu* :collect
(if (search href (request-uri jingle:*request*))
(hsx (li :class "text-pink-500"
label))
(hsx (li (a :href href :class "underline hover:text-pink-500"
label))))))))))