Use piccolo instead of flute

This commit is contained in:
Akira Tempaku 2024-02-09 05:54:51 +09:00
commit 6dabca16a2
4 changed files with 21 additions and 23 deletions

View file

@ -1,6 +1,6 @@
(defpackage #:hp/routes/index
(:use #:cl)
(:local-nicknames (#:f #:flute))
(:local-nicknames (#:pi #:piccolo))
(:local-nicknames (#:jg #:jingle))
(:local-nicknames (#:ui #:hp/ui/*))
(:local-nicknames (#:utils #:hp/utils/*))
@ -9,21 +9,19 @@
;;; View
(f:define-element page ()
(f:h
(pi:define-element page ()
(pi:h
(ui:layout
(section
:class "h-full flex justify-center items-center"
(h1
:class "text-4xl text-amber-500"
"Hello HTMX from Common Lisp!")))))
(section :class "h-full flex justify-center items-center"
(h1 :class "text-4xl text-amber-500"
"Hello HTMX from Common Lisp!")))))
;;; Controller
(defun index (params)
(declare (ignore params))
(jg:with-html-response
(f:element-string (page))))
(pi:element-string (page))))
(defparameter *index-app* (jg:make-app))

View file

@ -1,16 +1,16 @@
(defpackage #:hp/ui/layout
(:use #:cl)
(:local-nicknames (#:f #:flute))
(:local-nicknames (#:pi #:piccolo))
(:export #:layout))
(in-package #:hp/ui/layout)
(f:define-element layout ()
(f:h
(pi:define-element layout ()
(pi:h
(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]"
f:children))))
(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))))