Rename ui to components

This commit is contained in:
Akira Tempaku 2025-05-02 00:49:52 +09:00
parent 2d1b7d8eb5
commit f541321d55
Signed by: paku
GPG key ID: 5B4E8402BCC50607
4 changed files with 25 additions and 28 deletions

View file

@ -1,4 +1,4 @@
(defpackage #:hp/ui/layout (defpackage #:hp/components/layout
(:use #:cl (:use #:cl
#:hsx) #:hsx)
(:import-from #:hp/lib/metadata (:import-from #:hp/lib/metadata
@ -6,7 +6,7 @@
(:import-from #:jingle (:import-from #:jingle
#:request-uri) #:request-uri)
(:export #:~layout)) (:export #:~layout))
(in-package #:hp/ui/layout) (in-package #:hp/components/layout)
(defun bust-cache (url) (defun bust-cache (url)
(format nil "~a?v=~a" url #.(get-universal-time))) (format nil "~a?v=~a" url #.(get-universal-time)))
@ -41,10 +41,7 @@
:hx-ext "head-support, response-targets, preload" :hx-ext "head-support, response-targets, preload"
:hx-boost "true" :hx-target-404 "body" :hx-target-5* "body" :hx-boost "true" :hx-target-404 "body" :hx-target-5* "body"
:class (<> :class (<>
"h-[100svh] flex flex-col bg-[url(/img/bg.webp)] bg-cover bg-center " "bg-amber-50/90 flex flex-col h-[100svh] w-full max-w-[700px] "
"p-2 md:p-8")
(div :class (<>
"bg-amber-50/90 flex flex-col flex-1 w-full max-w-[700px] overflow-hidden shadow-sm "
"px-2 pt-2 mx-auto md:px-8 md:pt-8") "px-2 pt-2 mx-auto md:px-8 md:pt-8")
(header :class "flex justify-between pb-2 md:pb-4 border-b-1" (header :class "flex justify-between pb-2 md:pb-4 border-b-1"
(h1 :class "text-2xl md:text-3xl font-bold" (h1 :class "text-2xl md:text-3xl font-bold"
@ -63,4 +60,4 @@
(hsx (li (a :href href :class "underline hover:text-pink-500" (hsx (li (a :href href :class "underline hover:text-pink-500"
label)))))))) label))))))))
(main :class "flex-1 pt-2 pb-4 md:pt-4 md:pb-8 overflow-y-scroll " (main :class "flex-1 pt-2 pb-4 md:pt-4 md:pb-8 overflow-y-scroll "
children)))))) children)))))

View file

@ -9,7 +9,7 @@
(:import-from #:hp/lib/env (:import-from #:hp/lib/env
#:hp-url #:hp-url
#:hp-env) #:hp-env)
(:import-from #:hp/ui/layout (:import-from #:hp/components/layout
#:~layout)) #:~layout))
(in-package #:hp/renderer) (in-package #:hp/renderer)

View file

View file

@ -3,7 +3,7 @@ module.exports = {
content: [ content: [
"./src/renderer.lisp", "./src/renderer.lisp",
"./src/routes/**/*.lisp", "./src/routes/**/*.lisp",
"./src/ui/**/*.lisp", "./src/components/**/*.lisp",
], ],
theme: { theme: {
container: { container: {