aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-10-28 16:06:29 -0500
committerColin Okay <colin@cicadas.surf>2022-10-28 16:06:29 -0500
commit46371385ee5d95217b7b1fb636e17d9277835f69 (patch)
treed2d5dba329036cb1c5fee4df3df43ffadf113c08
parentc4363a63dbfee6ca4fbc7e35cc5a2b5329f7383f (diff)
Tweaks
-rw-r--r--explore.lisp8
-rw-r--r--home.lisp1
-rw-r--r--login.lisp1
-rw-r--r--navigation.lisp8
-rw-r--r--new-account.lisp1
-rw-r--r--playlist.lisp27
6 files changed, 26 insertions, 20 deletions
diff --git a/explore.lisp b/explore.lisp
index f562448..5e6ada0 100644
--- a/explore.lisp
+++ b/explore.lisp
@@ -8,13 +8,14 @@
(defun create-playlist-explore-card (parent pl)
(with-clog-create parent
- (div ()
+ (div (:bind card)
(img (:bind thumb))
- (section (:h4)
+ (div ()
(a (:link (url-to-playlist pl) :content (playlist-title pl)))
(span (:content " -- "))
(span (:content (secs-to-hms (playlist-duration pl))))))
- (setf (maximum-width thumb) "120px")
+ (setf (maximum-width thumb) "180px"
+ (width card) "200px")
(when-let (track (first (playlist-tracks pl)))
(setf (url-src thumb) (or (track-thumb-url track) "")))))
@@ -24,6 +25,7 @@
(create-playlist-explore-card container pl))))
(defun explore-page (body)
+ (include-style body)
(with-clog-create body
(div ()
(navigation-header ())
diff --git a/home.lisp b/home.lisp
index eb59e83..e7475ec 100644
--- a/home.lisp
+++ b/home.lisp
@@ -78,6 +78,7 @@
(defun user-home-page (body)
+ (include-style body)
(with-clog-create body
(div ()
(navigation-header ())
diff --git a/login.lisp b/login.lisp
index 1eb3955..4776fe5 100644
--- a/login.lisp
+++ b/login.lisp
@@ -3,6 +3,7 @@
(in-package :vampire)
(defun login-page (body)
+ (include-style body)
(with-clog-create body
(div ()
(div ()
diff --git a/navigation.lisp b/navigation.lisp
index 4f73917..b362fe1 100644
--- a/navigation.lisp
+++ b/navigation.lisp
@@ -4,6 +4,8 @@
(defun create-navigation-header (parent)
(with-clog-create parent
- (unordered-list ()
- (list-item () (a (:link "/home" :content "Home")))
- (list-item () (a (:link "/explore" :content "Explore"))))))
+ (section (:header )
+ (div ()
+ (img ( :url-src "/favicon.ico"))
+ (a (:link "/home" :content "Home"))
+ (a (:link "/explore" :content "Explore"))))))
diff --git a/new-account.lisp b/new-account.lisp
index b0ccae7..ea265a7 100644
--- a/new-account.lisp
+++ b/new-account.lisp
@@ -3,6 +3,7 @@
(in-package :vampire)
(defun new-accout-page (body)
+ (include-style body)
(with-clog-create body
(div ()
(section (:h2 :content "Create a new account"))
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 ())