Add alpine.js
This commit is contained in:
parent
998756e0da
commit
c56d072da4
8 changed files with 15 additions and 31 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
||||||
.qlot
|
.qlot
|
||||||
node_modules
|
node_modules
|
||||||
static/tailwind.css
|
static/style/tailwind.css
|
||||||
.vscode/alive
|
.vscode/alive
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@ install: ## Install dependencies
|
||||||
@qlot install ; npm i
|
@qlot install ; npm i
|
||||||
|
|
||||||
css: ## Scan and build tailwindcss
|
css: ## Scan and build tailwindcss
|
||||||
@npx tailwindcss -o ./static/tailwind.css --watch
|
@npx tailwindcss -o ./static/style/tailwind.css --watch
|
||||||
|
|
||||||
help: ## Show options
|
help: ## Show options
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
||||||
|
|
|
@ -9,8 +9,10 @@
|
||||||
(html
|
(html
|
||||||
(head
|
(head
|
||||||
(title "skyizwhite.dev")
|
(title "skyizwhite.dev")
|
||||||
(script :src "/static/htmx.min.js")
|
(script :src "/static/vendor/htmx.min.js")
|
||||||
(link :href "/static/main.css" :rel "stylesheet")
|
(script :defer t :src "/static/vendor/alpine.min.js")
|
||||||
(link :href "/static/tailwind.css" :rel "stylesheet"))
|
(link :href "/static/style/main.css" :rel "stylesheet")
|
||||||
(body :class "h-[100svh]"
|
(link :href "/static/style/tailwind.css" :rel "stylesheet"))
|
||||||
pi:children))))
|
(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)))))
|
|
5
static/vendor/alpine.min.js
vendored
Normal file
5
static/vendor/alpine.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
||||||
export default {
|
export default {
|
||||||
content: [
|
content: [
|
||||||
"./src/routes/**/*.lisp",
|
"./src/routes/**/*.lisp",
|
||||||
"./src/ui/**/*.lisp"
|
"./src/components/**/*.lisp"
|
||||||
],
|
],
|
||||||
plugins: [require("daisyui")],
|
plugins: [require("daisyui")],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue