Add alpine.js
This commit is contained in:
parent
998756e0da
commit
c56d072da4
8 changed files with 15 additions and 31 deletions
src
|
@ -9,8 +9,10 @@
|
|||
(html
|
||||
(head
|
||||
(title "skyizwhite.dev")
|
||||
(script :src "/static/htmx.min.js")
|
||||
(link :href "/static/main.css" :rel "stylesheet")
|
||||
(link :href "/static/tailwind.css" :rel "stylesheet"))
|
||||
(body :class "h-[100svh]"
|
||||
pi:children))))
|
||||
(script :src "/static/vendor/htmx.min.js")
|
||||
(script :defer t :src "/static/vendor/alpine.min.js")
|
||||
(link :href "/static/style/main.css" :rel "stylesheet")
|
||||
(link :href "/static/style/tailwind.css" :rel "stylesheet"))
|
||||
(body :class "h-[100svh] w-screen"
|
||||
(main :class "h-full"
|
||||
pi:children)))))
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
(uiop:define-package #:hp/routes/user/=name
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:local-nicknames (#:jg #:jingle))
|
||||
(:local-nicknames (#:cmp #:hp/components/*))
|
||||
(:export #:on-get))
|
||||
(in-package #:hp/routes/user/=name)
|
||||
|
||||
;;; View
|
||||
|
||||
(pi:define-element page (name)
|
||||
(pi:h
|
||||
(cmp:layout
|
||||
(section :class "h-full flex justify-center items-center"
|
||||
(p :class "text-primary text-4xl"
|
||||
"Hello, " name "!")))))
|
||||
|
||||
;;; Controller
|
||||
|
||||
(defun on-get (params)
|
||||
(jg:with-html-response
|
||||
(jg:with-request-params ((name :name)) params
|
||||
(pi:element-string (page :name name)))))
|
Loading…
Add table
Add a link
Reference in a new issue