aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-04-03 20:25:33 -0700
committercolin <colin@cicadas.surf>2024-04-03 20:25:33 -0700
commit9a11751b13eadc379e85292e622e4cf163248d28 (patch)
tree9e9a0cff45eb29e88259c36014ecf2fabb5eae5e
parent7893cbcf2f600a4ca05480f2d3258fb4f3a2134b (diff)
this might runvampire-api
-rw-r--r--src/model.lisp3
-rw-r--r--src/site.lisp70
2 files changed, 55 insertions, 18 deletions
diff --git a/src/model.lisp b/src/model.lisp
index ed26d9b..85a4f83 100644
--- a/src/model.lisp
+++ b/src/model.lisp
@@ -262,3 +262,6 @@ indicating that the CODE was not associated with any known INVITE."
title (unless (equal "" new-title) new-title)))))
+(defun playlist-cover-url (pl)
+ (declare (ignore pl))
+ "https://images5.fanpop.com/image/photos/31100000/Riker-star-trek-the-next-generation-31159197-1024-768.png")
diff --git a/src/site.lisp b/src/site.lisp
index 3977ffd..8241018 100644
--- a/src/site.lisp
+++ b/src/site.lisp
@@ -175,14 +175,25 @@ path we're visiting"
:onclick (:raw (ps-play/pause))
"⏯")))
-(defun now-playing-view (pl)
+(defun now-playing (pl)
(with-html
(:div :class "now-playing"
- (:img :id "now-playing-img" :src (or (model::cover-image pl) ""))
- (:div :class "playback-controls"
- (previous-track-button)
- (play/pause-button)
- (next-track-button)))))
+ (:img :id "now-playing-img" :src (model::playlist-cover-url pl))
+ (row :class "playback-controls"
+ (col
+ (previous-track-button))
+ (col
+ (play/pause-button))
+ (col
+ (next-track-button))))))
+
+(defun whos-responsible-for-this-travesty (pl)
+ (with-html
+ (:div (:p "people who made this list"))))
+
+(defun playlist-comments (pl)
+ (with-html
+ (:div (:p "Comments feature coming soon..."))))
(defun playlist-track-item (track)
"Generates a view of TRACK as it should appear in a list of tracks."
@@ -283,20 +294,12 @@ Achieve Chip Independence")))
(model:key pl)
(url-rewrite:url-encode (model:title pl))))
-#+off
-(defun playlist-card (pl)
- (with-html
- (:div :class "card"
- (:img :src (model::cover-image pl))
- (:a :href (playlist-page-url pl)
- (model:title pl)))))
-
(defun playlist-card (pl)
(with-html
(:a
:href (playlist-page-url pl)
:class "card"
- (:img :src (model::cover-image pl))
+ (:img :src (model::playlist-cover-url pl))
(:span
(model:title pl)))))
@@ -380,9 +383,18 @@ Achieve Chip Independence")))
(input "password" "Choose a Passwrod" "password"))))
-(defpage/session "/playlist/:pl control:a-playlist:/:title:"
+(defpage/session "/playlist/:pl control:a-playlist:/:a-title-if-you-want:"
(:title (model:title pl))
- (:h1 (model:title pl)))
+ (:h1 (model:title pl))
+ (row
+ (col
+ (row (now-playing pl))
+ (row (whos-responsible-for-this-travesty pl))
+ (row (playlist-comments pl)))
+ (col
+ (loop :repeat 10 :do
+ (:p "track listing or something" "-- " "track controls")
+ (:hr)))))
;;; CSS
@@ -453,7 +465,10 @@ Achieve Chip Independence")))
:color #(active-color)))
(.row
- :display flex)
+ :justify-content space-evenly
+ :display flex
+ :flex-wrap wrap
+ :width 100%)
(.col
:flex 1)
@@ -478,6 +493,25 @@ Achieve Chip Independence")))
:text-align center
:border-bottom 1px dotted #(fringe-color))
+ (img
+ :margin-left 10%
+ :max-height 80%
+ :max-width 80%)
+
+ (.now-playing
+ :width 480px
+ :height 480px
+ :border 1px solid #(fringe-color))
+
+ ((.playback-controls button)
+ :border 1px solid #(fringe-color)
+ :background #(main-background)
+ :color #(fringe-color)
+ :font-size 2em
+ :margin-left 10%
+ :width 80%)
+
+
(:media "(max-width: 650px)"
(.navbar
(a