From a95cdd714187903ed24e40804c449e8e4737f027 Mon Sep 17 00:00:00 2001 From: Grant Shoshin Shangreaux Date: Sat, 6 Jul 2024 15:44:51 -0500 Subject: Add: redefined pages with hypnotisml syntax --- package.lisp | 4 ++-- site/home.lisp | 33 ++++++++++++++++----------------- site/html.lisp | 22 ++++++++++++---------- site/login.lisp | 25 +++++++++++-------------- 4 files changed, 41 insertions(+), 43 deletions(-) diff --git a/package.lisp b/package.lisp index d4cf438..a6543c9 100644 --- a/package.lisp +++ b/package.lisp @@ -1,13 +1,13 @@ ;;;; package.lisp (defpackage #:vampire - (:use #:cl) + (:use #:cl #:hypnotisml) (:local-nicknames (#:db #:bknr.datastore) (#:wknd #:weekend) - (#:html #:hypnotisml) (#:a #:alexandria-2) (#:zippy #:org.shirakumo.zippy )) + (:import-from #:hypnotisml) (:import-from #:flatbind #:do>) (:import-from #:bknr.datastore #:with-transaction diff --git a/site/home.lisp b/site/home.lisp index 0b02e0c..ebc644b 100644 --- a/site/home.lisp +++ b/site/home.lisp @@ -4,20 +4,19 @@ :using user-known :get :route "" :returns "text/html" - :handle (page (:title "V A M P I R E") - (:div :id "main" - (:h1 "hey " (user-name user)) - (:br) - (:div - (:form :method "POST" :action (wknd:route-to 'destroy.session) - (:button :type "submit" "Logout"))) - (:br) - (:br) - (:div - (:form :method "POST" :action (wknd:route-to 'create.invite) - (:p "Initiate an invitation...") - (:button :type "submit" "Bite Someone"))) - (:br) - (:h2 "Outstanding inBites:") - (:ul (dolist (i (invites-by-maker user)) - (:li (key i))))))) + :handle + (page + "V A M P I R E" + (
+ ($vcenter + (
(

"hey " (user-name user)) + (
(@ :method "POST" :action (wknd:route-to 'destroy.session)) + (