website/src/routes/index.lisp

54 lines
1.7 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
#:website/helper)
2025-05-17 00:38:08 +09:00
(:import-from #:website/lib/cms
#:get-about)
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")
2025-05-04 08:48:31 +09:00
("Status"
2025-05-03 13:01:49 +09:00
"https://status.skyizwhite.dev"
"/img/icon/server.svg")))
2025-03-28 23:12:07 +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-17 00:38:08 +09:00
(let ((about (get-about :query '(:fields "avatar"))))
(hsx
(div :class "flex flex-col items-center justify-center h-full"
(img
:src (getf (getf about :avatar) :url)
:alt "avatar" :class "size-40 rounded-xl shadow-sm avatar")
(div :class "flex flex-col items-center gap-2 py-6"
(h1 :class "font-bold text-2xl text-center"
"Akira Tempaku")
(p :class "text-xl"
"Web developer"))
(div :class "flex flex-col gap-2 items-left"
(loop
: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"
:rel "me"
(img :src icon :alt name :class "size-4 mt-1")
(span name)))))))))
2025-05-01 12:46:15 +09:00
; for health check
(defun handle-head (params)
(declare (ignore params)))