website/src/routes/index.lisp

52 lines
1.6 KiB
Common Lisp
Raw Normal View History

2025-05-02 09:39:55 +09:00
(defpackage #:website/routes/index
2024-06-15 16:42:44 +09:00
(:use #:cl
2024-10-02 23:36:30 +09:00
#:hsx)
2025-05-01 12:46:15 +09:00
(:export #:handle-get
#:handle-head))
2025-05-02 09:39:55 +09:00
(in-package #:website/routes/index)
2024-02-02 01:07:19 +09:00
2025-03-28 23:12:07 +09:00
(defparameter *links*
2025-05-03 13:01:49 +09:00
'(("Keyoxide"
"https://keyoxide.org/f39d5b2c951d16732a5cd3528f0c1a22f26d7e62"
"/img/icon/key.svg")
("GitHub"
"https://github.com/skyizwhite"
"/img/icon/github.svg")
("Forgejo"
"https://code.skyizwhite.dev/paku"
"/img/icon/forgejo.svg")
("Fediverse"
"https://himagine.club/@skyizwhite"
"/img/icon/discussion.svg")
("Service Status"
"https://status.skyizwhite.dev"
"/img/icon/server.svg")))
2025-03-28 23:12:07 +09:00
2024-12-12 13:21:19 +09:00
(defcomp ~page ()
2024-06-01 22:21:15 +09:00
(hsx
2025-03-28 23:12:07 +09:00
(section :class "flex flex-col items-center justify-center h-full"
2025-04-29 19:13:40 +09:00
(img :src "/img/avatar.webp" :alt "avatar" :class "size-40 rounded-xl shadow-sm")
2025-03-28 23:12:07 +09:00
(div :class "flex flex-col items-center gap-2 py-6"
2025-04-29 18:04:02 +09:00
(h1 :class "font-bold text-2xl text-center"
2025-03-28 23:12:07 +09:00
"Akira Tempaku")
(p :class "text-xl"
"Web developer"))
2025-05-03 13:01:49 +09:00
(div :class "flex flex-col gap-2 items-left"
2025-03-28 23:12:07 +09:00
(loop
2025-05-03 13:01:49 +09:00
:for (name url icon) :in *links*
:collect (hsx (a
:href url
:target "_blank"
:class "flex items-center gap-2 text-lg hover:text-pink-500"
(img :src icon :alt name :class "size-4 mt-1")
(span name))))))))
2025-03-29 02:47:17 +09:00
2024-04-14 16:40:47 +09:00
(defun handle-get (params)
2024-02-02 01:07:19 +09:00
(declare (ignore params))
2025-05-01 00:37:46 +09:00
(list :body (~page)
:cache :static))
2025-05-01 12:46:15 +09:00
; for health check
(defun handle-head (params)
(declare (ignore params)))