;;; explore.lisp (in-package :vampire) (defun create-media-search-area (parent) (with-clog-create parent (p (:content "media search area")))) (defun create-playlist-explore-card (parent pl) (with-clog-create parent (div (:bind card) (a (:link (url-to-playlist pl) ) (img (:bind thumb)) (br ()) (span (:content (playlist-title pl))) (span (:content " -- ")) (span (:content (secs-to-hms (playlist-duration pl)))))) (setf (maximum-width thumb) "180px" (width card) "200px") (when-let (track (first (playlist-tracks pl))) (setf (url-src thumb) (or (track-thumb-url track) ""))))) (defun create-recent-playlists-area (parent) (let* ((container (create-div parent :class "row"))) (dolist (pl (recent-playlists 100)) (create-playlist-explore-card container pl)))) (defun explore-page (body) (include-style body) (with-clog-create body (div () (navigation-header ()) ;(media-search-area ()) (section (:h2 :content "Recent Playlists" :class "center")) (recent-playlists-area ()))))