Update ningle-fbr
This commit is contained in:
parent
a8062f1d57
commit
1045b38387
5 changed files with 22 additions and 20 deletions
|
@ -21,7 +21,7 @@
|
|||
("ningle-fbr" .
|
||||
(:class qlot/source/git:source-git
|
||||
:initargs (:remote-url "https://github.com/skyizwhite/ningle-fbr.git")
|
||||
:version "git-e84b170a03c6cee3a4b2b191469e83251ae9e032"))
|
||||
:version "git-79496d59002546e800fcf0ac59e176ada74a3fb0"))
|
||||
("cl-ppcre" .
|
||||
(:class qlot/source/ql:source-ql
|
||||
:initargs (:%version :latest)
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
(:use #:cl)
|
||||
(:local-nicknames (#:jg #:jingle))
|
||||
(:local-nicknames (#:fbr #:ningle-fbr))
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:local-nicknames (#:view #:hp/view))
|
||||
(:local-nicknames (#:cmp #:hp/components/*))
|
||||
(:local-nicknames (#:mw #:hp/middlewares/*))
|
||||
(:export #:start
|
||||
#:stop
|
||||
|
@ -15,12 +12,6 @@
|
|||
(defparameter *app* (jg:make-app :address "localhost"
|
||||
:port 3000))
|
||||
|
||||
(defmethod jg:not-found ((app jg:app))
|
||||
(view:render (cmp:not-found-page)
|
||||
:status :not-found
|
||||
:metadata '(:title "404 Not Found"
|
||||
:description "お探しのページは見つかりませんでした。")))
|
||||
|
||||
(defun start ()
|
||||
(jg:start *app*))
|
||||
|
||||
|
|
0
src/components/.keep
Normal file
0
src/components/.keep
Normal file
|
@ -1,10 +0,0 @@
|
|||
(defpackage #:hp/components/not-found
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:export #:not-found-page))
|
||||
(in-package #:hp/components/not-found)
|
||||
|
||||
(pi:define-element not-found-page ()
|
||||
(pi:h
|
||||
(section
|
||||
(h1 "404 Not Found"))))
|
21
src/routes/not-found.lisp
Normal file
21
src/routes/not-found.lisp
Normal file
|
@ -0,0 +1,21 @@
|
|||
(defpackage #:hp/routes/not-found
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:jg #:jingle))
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:local-nicknames (#:view #:hp/view))
|
||||
(:export #:handle-not-found))
|
||||
(in-package #:hp/routes/not-found)
|
||||
|
||||
(defparameter *metadata*
|
||||
'(:title "404 Not Found"
|
||||
:description "お探しのページは見つかりませんでした。"))
|
||||
|
||||
(pi:define-element page ()
|
||||
(pi:h
|
||||
(section
|
||||
(h1 "404 Not Found"))))
|
||||
|
||||
(defun handle-not-found ()
|
||||
(view:render (page)
|
||||
:status :not-found
|
||||
:metadata *metadata*))
|
Loading…
Add table
Add a link
Reference in a new issue