diff options
author | Colin Okay <colin@cicadas.surf> | 2022-10-28 06:52:51 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-10-28 06:52:51 -0500 |
commit | 5b0c8784305b9a2bf34816b264a8d9c6968d0bcc (patch) | |
tree | 72401df3d45db56a818c41e0955a2175a07c4e66 | |
parent | 4384b353d9df4d9ab7b958b8081fccf3d9f5aacb (diff) |
Rem+Add: delete old code; add explore to asd;
-rw-r--r-- | vampire.asd | 1 | ||||
-rw-r--r-- | vampire.lisp | 53 |
2 files changed, 2 insertions, 52 deletions
diff --git a/vampire.asd b/vampire.asd index 2861383..ccb1df3 100644 --- a/vampire.asd +++ b/vampire.asd @@ -21,6 +21,7 @@ (:file "session") (:file "navigation") (:file "new-account") + (:file "explore") (:file "login") (:file "home") (:file "playlist") diff --git a/vampire.lisp b/vampire.lisp index b620a2b..f149255 100644 --- a/vampire.lisp +++ b/vampire.lisp @@ -17,58 +17,7 @@ passing as the keyword arguments to (MAKE-INSTANCE 'CONFIG ...)" (apply #'make-instance 'config (read-from-file path))) -;;; RESOURCE MODEL - - - -;;; TRANSACTIONS - - - -;;; CLIENT - - - - - - - - - -(defun create-new-playlist-form (parent &rest args) - (declare (ignorable args)) - (with-clog-create parent - (div () - (section (:h2 :content "Create New Playlist")) - (label (:content "Playlist Title:")) - (form-element (:text :bind pl-title)) - (button (:content "Create" :bind btn))) - (set-on-click - btn - (thunk* - (new-playlist (session-user parent) :title (value pl-title)) - (reload (location (connection-body parent))))))) - -(defun url-to-playlist (pl location) - (format nil "~a//~a/playlist/~a" - (protocol location) - (host location) - (key pl))) - -(defun create-playlist-listing (parent &rest args) - (declare (ignorable args)) - (dolist (pl (user-playlists (session-user parent))) - (let ((url - (url-to-playlist pl (location (connection-body parent))))) - (with-clog-create parent - (div () - (section (:h4) - (a (:link url :content (playlist-title pl) :bind pl-link)))) - (set-on-click - pl-link - (thunk* - (setf (url (location (connection-body parent))) - url))))))) +;;; MAIN (defun main (body) (if (session-user body) |