From 7821782646ae2507012451548c48031bdfe8192f Mon Sep 17 00:00:00 2001
From: Akira Tempaku <paku@skyizwhite.dev>
Date: Sun, 25 May 2025 17:43:47 +0900
Subject: [PATCH] Improve nav menu

---
 src/components/header.lisp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/components/header.lisp b/src/components/header.lisp
index 3776a5d..0e90283 100644
--- a/src/components/header.lisp
+++ b/src/components/header.lisp
@@ -5,11 +5,14 @@
   (:export #:~header))
 (in-package #:website/components/header)
 
-(defparameter *nav-menu*
+(defparameter *pc-menu*
   '(("/about" "about")
     ("/works" "works")
     ("/blog" "blog")))
 
+(defparameter *sp-menu*
+  (cons '("/" "home") *pc-menu*))
+
 (defcomp ~pc-header ()
   (hsx
    (header :class "hidden md:flex justify-between py-4 border-b-1 top-0 bg-white"
@@ -18,7 +21,7 @@
      (nav :class "flex items-end"
        (ul :preload "mouseover" :class "flex gap-4 text-xl font-bold"
          (loop
-           :for (href label) :in *nav-menu* :collect
+           :for (href label) :in *pc-menu* :collect
               (if (string= href (request-uri *request*))
                   (hsx (li :class "text-pink-500" label))
                   (hsx (li (a :href href :class "hover:text-pink-500" label))))))))))
@@ -59,7 +62,7 @@
            :preload "mousedown"
            :class "flex flex-col h-fit gap-8 text-3xl font-bold"
            (loop
-             :for (href label) :in (append '(("/" "home")) *nav-menu*) :collect
+             :for (href label) :in *sp-menu* :collect
                 (if (string= href (request-uri *request*))
                     (hsx (li :class "text-pink-500" label))
                     (hsx (li (a :href href :class "hover:text-pink-500" label)))))))))))