Improve
This commit is contained in:
parent
0441d03206
commit
21c2d8aa99
18 changed files with 130 additions and 117 deletions
src/components
12
src/components/global/document.lisp
Normal file
12
src/components/global/document.lisp
Normal file
|
@ -0,0 +1,12 @@
|
|||
(defpackage #:hp/components/global/document
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:export #:document))
|
||||
(in-package #:hp/components/global/document)
|
||||
|
||||
(pi:define-element document (metadata)
|
||||
(pi:h
|
||||
(html :lang "ja"
|
||||
metadata
|
||||
(body :hx-ext "head-support"
|
||||
pi:children))))
|
9
src/components/global/layout.lisp
Normal file
9
src/components/global/layout.lisp
Normal file
|
@ -0,0 +1,9 @@
|
|||
(defpackage #:hp/components/global/layout
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:export #:layout))
|
||||
(in-package #:hp/components/global/layout)
|
||||
|
||||
(pi:define-element layout ()
|
||||
(pi:h
|
||||
(main pi:children)))
|
18
src/components/global/metadata.lisp
Normal file
18
src/components/global/metadata.lisp
Normal file
|
@ -0,0 +1,18 @@
|
|||
(defpackage #:hp/components/global/metadata
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:export #:metadata))
|
||||
(in-package #:hp/components/global/metadata)
|
||||
|
||||
(pi:define-element metadata (title description)
|
||||
(pi:h
|
||||
(head
|
||||
(meta :charset "UTF-8")
|
||||
(title (format nil "~@[~a | ~]skyizwhite.dev" title))
|
||||
(meta
|
||||
:name "description"
|
||||
:content (or description "pakuの個人サイト"))
|
||||
(script :src "/public/js/htmx.js")
|
||||
(script :src "/public/js/htmx-ext/head-support.js")
|
||||
(script :src "/public/js/alpine.js" :defer t)
|
||||
(link :rel "stylesheet" :type "text/css" :href "/public/style/main.css"))))
|
10
src/components/global/not-found.lisp
Normal file
10
src/components/global/not-found.lisp
Normal file
|
@ -0,0 +1,10 @@
|
|||
(defpackage #:hp/components/global/not-found
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:export #:not-found-page))
|
||||
(in-package #:hp/components/global/not-found)
|
||||
|
||||
(pi:define-element not-found-page ()
|
||||
(pi:h
|
||||
(section
|
||||
(h1 "404 Not Found"))))
|
|
@ -1,18 +0,0 @@
|
|||
(uiop:define-package #:hp/components/layout
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:export #:layout))
|
||||
(in-package #:hp/components/layout)
|
||||
|
||||
(pi:define-element layout ()
|
||||
(pi:h
|
||||
(html
|
||||
(head
|
||||
(title "skyizwhite.dev")
|
||||
(script :src "/js/htmx.min.js")
|
||||
(script :src "/js/htmx-ext/head-support.js")
|
||||
(script :src "/js/alpine.min.js" :defer t)
|
||||
(link :rel "stylesheet" :href "/style/main.css" type="text/css"))
|
||||
(body :hx-ext "head-support"
|
||||
(main
|
||||
pi:children)))))
|
|
@ -1,13 +0,0 @@
|
|||
(uiop:define-package #:hp/components/not-found
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:import-from #:hp/components/layout
|
||||
#:layout)
|
||||
(:export #:not-found-page))
|
||||
(in-package #:hp/components/not-found)
|
||||
|
||||
(pi:define-element not-found-page ()
|
||||
(pi:h
|
||||
(layout
|
||||
(section
|
||||
(h1 "404 Not Found")))))
|
Loading…
Add table
Add a link
Reference in a new issue