Use flute instead of markup
This commit is contained in:
parent
c0529119f9
commit
ef0cd5b77e
4 changed files with 26 additions and 28 deletions
2
qlfile
2
qlfile
|
@ -5,4 +5,4 @@ ql alexandria
|
|||
ql lack
|
||||
ql clack
|
||||
ql cl-jingle
|
||||
ql markup
|
||||
git flute https://github.com/skyizwhite/flute.git
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
(:class qlot/source/ql:source-ql
|
||||
:initargs (:%version :latest)
|
||||
:version "ql-2023-10-21"))
|
||||
("markup" .
|
||||
(:class qlot/source/ql:source-ql
|
||||
:initargs (:%version :latest)
|
||||
:version "ql-2023-10-21"))
|
||||
("flute" .
|
||||
(:class qlot/source/git:source-git
|
||||
:initargs (:remote-url "https://github.com/skyizwhite/flute.git")
|
||||
:version "git-a4bf72232f5de50b826d618f7b6ae0e75494e6f3"))
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
(defpackage #:hp/routes/index
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:mk #:markup))
|
||||
(:local-nicknames (#:f #:flute))
|
||||
(:local-nicknames (#:jg #:jingle))
|
||||
(:local-nicknames (#:ui #:hp/ui/*))
|
||||
(:local-nicknames (#:utils #:hp/utils/*))
|
||||
(:export #:*index-app*))
|
||||
(in-package #:hp/routes/index)
|
||||
|
||||
(mk:enable-reader)
|
||||
|
||||
;;; View
|
||||
|
||||
(mk:deftag page ()
|
||||
<ui:layout>
|
||||
<section class="h-full flex justify-center items-center" >
|
||||
<h1 class="text-4xl text-amber-500" >Hello HTMX from Common Lisp!</h1>
|
||||
</section>
|
||||
</ui:layout>)
|
||||
(f:define-element page ()
|
||||
(f:h
|
||||
(ui:layout
|
||||
(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
|
||||
(mk:write-html <page />)))
|
||||
(f:element-string (page))))
|
||||
|
||||
(defparameter *index-app* (jg:make-app))
|
||||
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
(defpackage #:hp/ui/layout
|
||||
(:use #:cl)
|
||||
(:local-nicknames (#:mk #:markup))
|
||||
(:local-nicknames (#:f #:flute))
|
||||
(:export #:layout))
|
||||
(in-package #:hp/ui/layout)
|
||||
|
||||
(markup:enable-reader)
|
||||
|
||||
(mk:deftag layout (children)
|
||||
<html>
|
||||
<head>
|
||||
<title>skyizwhite.dev</title>
|
||||
<script src="/static/htmx.min.js" ></script>
|
||||
<link href="/static/main.css" rel="stylesheet">
|
||||
<link href="/static/tailwind.css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="h-[100svh]" >,@(progn children)</body>
|
||||
</html>)
|
||||
(f:define-element layout ()
|
||||
(f: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))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue