Add htmx, alpine.js, pico.css
This commit is contained in:
parent
1d5a6c1d8a
commit
07bff148ec
5 changed files with 11 additions and 8 deletions
src
|
@ -25,7 +25,6 @@
|
|||
(fbr:assign-routes *app* :system "hp" :directory "src/routes")
|
||||
(jg:install-middleware *app* mw:*path-normalizer*)
|
||||
(jg:install-middleware *app* mw:*public-server*)
|
||||
(jg:install-middleware *app* mw:*access-logger*)
|
||||
(jg:install-middleware *app* mw:*recoverer*))
|
||||
|
||||
(defun update ()
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
(html :lang "ja"
|
||||
(head
|
||||
(meta :charset "UTF-8")
|
||||
(meta :name "viewport" :content "width=device-width, initial-scale=1")
|
||||
(meta :name "color-scheme" :content "light dark")
|
||||
(link :rel "stylesheet" :href "https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css")
|
||||
(script :src "https://cdn.jsdelivr.net/npm/htmx.org@1.9.12/dist/htmx.min.js")
|
||||
(script :src "https://cdn.jsdelivr.net/npm/htmx.org@1.9.12/dist/ext/head-support.js")
|
||||
(script :src "https://cdn.jsdelivr.net/npm/alpinejs@3.14.0/dist/cdn.min.js" :defer t)
|
||||
(title (format nil "~@[~a - ~]skyizwhite.dev" title))
|
||||
(meta
|
||||
:name "description"
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
(defcomp layout (&key children)
|
||||
(hsx
|
||||
(body
|
||||
(header)
|
||||
(main
|
||||
children)
|
||||
(footer))))
|
||||
(body :hx-ext "head-support"
|
||||
(main :class "container"
|
||||
children))))
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
(defun response (page &key status metadata)
|
||||
(jg:with-html-response
|
||||
(if status (jg:set-response-status status))
|
||||
(hsx:render-to-string (cmp:document :metadata metadata
|
||||
(hsx:render-to-string (cmp:document metadata
|
||||
(cmp:layout page)))))
|
||||
|
||||
(defun partial-response (component &key status)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
(defcomp page ()
|
||||
(hsx
|
||||
(h1 "Hello, World!")))
|
||||
(h1 "こんにちは")))
|
||||
|
||||
(defun handle-get (params)
|
||||
(declare (ignore params))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue