This commit is contained in:
Akira Tempaku 2024-04-12 03:49:34 +09:00
commit 21c2d8aa99
18 changed files with 130 additions and 117 deletions
src/routes

View file

@ -1,8 +1,7 @@
(uiop:define-package #:hp/routes/index
(defpackage #:hp/routes/index
(:use #:cl)
(:local-nicknames (#:pi #:piccolo))
(:local-nicknames (#:jg #:jingle))
(:local-nicknames (#:cmp #:hp/components/*))
(:local-nicknames (#:view #:hp/view))
(:export #:on-get))
(in-package #:hp/routes/index)
@ -10,11 +9,13 @@
(pi:define-element page ()
(pi:h
(div)))
(section
(h1 "Hello, World!")
(a :href "/about" :hx-boost "true"
"About"))))
;;; Controller
(defun on-get (params)
(declare (ignore params))
(jg:with-html-response
(pi:element-string (page))))
(view:render-page (page)))