use-package piccolo

This commit is contained in:
Akira Tempaku 2024-04-26 01:22:50 +09:00
commit 430c1ee5a8
4 changed files with 53 additions and 53 deletions
src/routes

View file

@ -1,19 +1,23 @@
(defpackage #:hp/routes/index
(:use #:cl)
(:local-nicknames (#:pi #:piccolo))
(:use #:cl
#:piccolo)
(:local-nicknames (#:view #:hp/view/*))
(:export #:handle-get))
(in-package #:hp/routes/index)
(pi:define-element page ()
(pi:h
(div :class "h-full place-content-center"
(h1
:x-data "{flag: true}"
:@click "flag = ! flag"
:class "text-4xl text-center"
:|:class| "flag ? 'text-red-400' : 'text-blue-400'"
"Hello, world!"))))
(define-element page ()
(div :class "h-full place-content-center"
(h1
:x-data "{
flag: true,
toggle() {
this.flag = !this.flag
}
}"
:@click "toggle"
:class "text-4xl text-center"
:|:class| "flag ? 'text-red-400' : 'text-blue-400'"
"Hello, world!")))
(defun handle-get (params)
(declare (ignore params))