From 46371385ee5d95217b7b1fb636e17d9277835f69 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 28 Oct 2022 16:06:29 -0500 Subject: Tweaks --- playlist.lisp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'playlist.lisp') diff --git a/playlist.lisp b/playlist.lisp index e23fb70..08c2bbb 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -94,19 +94,19 @@ (defun start-playback (ctl) (when-let (tr (now-playing-track ctl)) (play-media (audio tr)) - (setf (text (np-play ctl)) "||"))) + (setf (text (np-play ctl)) "⏸"))) (defun pause-playback (ctl) (when-let (tr (now-playing-track ctl)) (pause-media (audio tr)) - (setf (text (np-play ctl)) "|>"))) + (setf (text (np-play ctl)) "⏵"))) (defun stop-playback (ctl) (when-let (tr (now-playing-track ctl)) (pause-media (audio tr)) (setf (media-position (audio tr)) 0 (now-playing-track ctl) nil - (text (np-play ctl)) "|>"))) + (text (np-play ctl)) "⏵"))) ;;; CLIENT CONTROL @@ -121,7 +121,7 @@ (let ((tr (track track-ctl))) (setf (text (np-title ctl)) (track-title tr) (text (np-artist ctl)) (if (track-artist tr) - (format nil "~a |" (track-artist tr)) + (format nil "~a" (track-artist tr)) "") (url-src (np-thumb ctl)) (or (track-thumb-url tr) "") (text (np-dur ctl)) (secs-to-hms (or (track-duration tr) 0)) @@ -228,11 +228,10 @@ (defun create-now-playing-display (parent ctl) (with-clog-create parent - (div (:class "now-playing-display") + (div () (section (:h3 :content "Now Playing")) (img (:bind thumb)) (section (:h4) - (span (:content " | ")) (span (:bind title)) (span (:content " | ")) (span (:bind artist))) @@ -240,9 +239,9 @@ (span (:bind time)) (span (:content " / ")) (span (:bind dur))) - (button (:content "<<" :bind back)) - (button (:content "|>" :bind play)) - (button (:content ">>" :bind forward))) + (button (:content "⏮" :bind back )) + (button (:content "⏵" :bind play )) + (button (:content "⏭" :bind forward ))) (setf (np-title ctl) title (np-artist ctl) artist (np-thumb ctl) thumb @@ -269,16 +268,15 @@ (defun create-track-list-item (list track ctl) (with-clog-create list - (list-item (:bind container) + (list-item (:bind container ) (div (:bind edit-controls) (button (:content "delete " :bind delbtn)) (button (:content "↓" :bind downbtn)) (button (:content "↑" :bind upbtn))) - (div (:bind item) + (div (:bind item ) (span (:content (track-listing-line track))) (span (:content " -- ")) (span (:content (secs-to-hms (or (track-duration track) 0))))) - (audio (:source (media-url-path track) :controls nil :bind audio))) (let ((track-ctl (make-instance 'track-ctl @@ -287,7 +285,6 @@ :track track))) (setf (tracks ctl) (insert-nth track-ctl -1 (tracks ctl) t)) - (cond ((editorp ctl) (set-on-click delbtn (thunk* (remove-track track-ctl))) @@ -302,7 +299,8 @@ (defun create-track-listing (parent pl) (when-let (ctl (cur-playlist-ctl parent)) - (let ((ol (create-ordered-list parent))) + (create-section parent :h3 :content "TRACKS") + (let ((ol (create-ordered-list parent ))) (setf (pl-tracks ctl) ol) (dolist (track (playlist-tracks pl)) (create-track-list-item ol track ctl))))) @@ -397,6 +395,7 @@ (let ((ctl (install-new-playlist-ctl pl body))) (add-playlist-viewer ctl) + (include-style body) (with-clog-create body (div () (navigation-header ()) -- cgit v1.2.3