diff --git a/src/app.lisp b/src/app.lisp index b4e5985..5fd0725 100644 --- a/src/app.lisp +++ b/src/app.lisp @@ -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 () diff --git a/src/components/document.lisp b/src/components/document.lisp index 963e617..d4202d6 100644 --- a/src/components/document.lisp +++ b/src/components/document.lisp @@ -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" diff --git a/src/components/layout.lisp b/src/components/layout.lisp index 6e19c77..a9a5402 100644 --- a/src/components/layout.lisp +++ b/src/components/layout.lisp @@ -6,8 +6,6 @@ (defcomp layout (&key children) (hsx - (body - (header) - (main - children) - (footer)))) + (body :hx-ext "head-support" + (main :class "container" + children)))) diff --git a/src/response.lisp b/src/response.lisp index 437db4c..1ec6d25 100644 --- a/src/response.lisp +++ b/src/response.lisp @@ -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) diff --git a/src/routes/index.lisp b/src/routes/index.lisp index e703bc1..c3b053d 100644 --- a/src/routes/index.lisp +++ b/src/routes/index.lisp @@ -7,7 +7,7 @@ (defcomp page () (hsx - (h1 "Hello, World!"))) + (h1 "こんにちは"))) (defun handle-get (params) (declare (ignore params))