2024-04-14 23:11:47 +09:00
|
|
|
(defpackage #:hp/routes/not-found
|
2024-04-26 01:22:50 +09:00
|
|
|
(:use #:cl
|
2024-10-02 23:36:30 +09:00
|
|
|
#:hsx)
|
|
|
|
(:local-nicknames (#:jg #:jingle))
|
2024-04-14 23:11:47 +09:00
|
|
|
(:export #:handle-not-found))
|
|
|
|
(in-package #:hp/routes/not-found)
|
|
|
|
|
|
|
|
(defparameter *metadata*
|
|
|
|
'(:title "404 Not Found"
|
2024-11-17 00:59:06 +09:00
|
|
|
:description "The page you are looking for may have been deleted or the URL might be incorrect."))
|
2024-04-14 23:11:47 +09:00
|
|
|
|
2024-06-01 22:21:15 +09:00
|
|
|
(defcomp page ()
|
|
|
|
(hsx
|
2024-11-17 22:18:59 +09:00
|
|
|
(section :class "container flex flex-col justify-center items-center h-full gap-10"
|
2024-11-16 20:37:45 +09:00
|
|
|
(h1 :class "text-2xl text-red-600"
|
2024-11-17 00:59:06 +09:00
|
|
|
(getf *metadata* :title))
|
2024-11-16 20:37:45 +09:00
|
|
|
(p (getf *metadata* :description))
|
2024-11-17 00:59:06 +09:00
|
|
|
(a :href "/" :class "text-orange-600"
|
|
|
|
"Return to the homepage"))))
|
2024-04-14 23:11:47 +09:00
|
|
|
|
|
|
|
(defun handle-not-found ()
|
2024-10-02 23:36:30 +09:00
|
|
|
(jg:set-response-status :not-found)
|
|
|
|
(list (page) *metadata*))
|