Improved page navigation and import of on-demand assets

This commit is contained in:
Akira Tempaku 2024-04-21 19:09:58 +09:00
commit 4663341497
14 changed files with 248 additions and 55 deletions
src/routes

View file

@ -7,13 +7,18 @@
(pi:define-element page ()
(pi:h
(section :data-css "pages/index"
(section (view:asset-props :style "pages/index"
:script "pages/index"
:x-data "indexPageState")
(h1
"Hello, World!")
(a :href "/about"
(a :href "/about" :hx-boost "true"
"About")
(button :x-data t :@click "$store.darkMode.toggle()"
"Toggle theme"))))
"Toggle theme")
(button
:@click "increment()"
(span :x-text "count")))))
(defun handle-get (params)
(declare (ignore params))