Rename ui to components
This commit is contained in:
parent
2d1b7d8eb5
commit
f541321d55
4 changed files with 25 additions and 28 deletions
|
@ -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)))
|
||||||
|
@ -40,27 +40,24 @@
|
||||||
(body
|
(body
|
||||||
: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")
|
"px-2 pt-2 mx-auto md:px-8 md:pt-8")
|
||||||
(div :class (<>
|
(header :class "flex justify-between pb-2 md:pb-4 border-b-1"
|
||||||
"bg-amber-50/90 flex flex-col flex-1 w-full max-w-[700px] overflow-hidden shadow-sm "
|
(h1 :class "text-2xl md:text-3xl font-bold"
|
||||||
"px-2 pt-2 mx-auto md:px-8 md:pt-8")
|
(a :href "/"
|
||||||
(header :class "flex justify-between pb-2 md:pb-4 border-b-1"
|
"skyizwhite"))
|
||||||
(h1 :class "text-2xl md:text-3xl font-bold"
|
(nav :class "flex items-end"
|
||||||
(a :href "/"
|
(ul
|
||||||
"skyizwhite"))
|
:preload "mouseover"
|
||||||
(nav :class "flex items-end"
|
:class "flex gap-4 text-lg"
|
||||||
(ul
|
(loop
|
||||||
:preload "mouseover"
|
:for (href label) :in *nav-menu*
|
||||||
:class "flex gap-4 text-lg"
|
:collect
|
||||||
(loop
|
(if (search href (request-uri jingle:*request*))
|
||||||
:for (href label) :in *nav-menu*
|
(hsx (li :class "text-pink-500"
|
||||||
:collect
|
label))
|
||||||
(if (search href (request-uri jingle:*request*))
|
(hsx (li (a :href href :class "underline hover:text-pink-500"
|
||||||
(hsx (li :class "text-pink-500"
|
label))))))))
|
||||||
label))
|
(main :class "flex-1 pt-2 pb-4 md:pt-4 md:pb-8 overflow-y-scroll "
|
||||||
(hsx (li (a :href href :class "underline hover:text-pink-500"
|
children)))))
|
||||||
label))))))))
|
|
||||||
(main :class "flex-1 pt-2 pb-4 md:pt-4 md:pb-8 overflow-y-scroll "
|
|
||||||
children))))))
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue