From 9ccacd92cbe375519896f1f62483dea17b497c17 Mon Sep 17 00:00:00 2001 From: Sijmen Date: Sun, 7 May 2023 02:51:34 +0200 Subject: [PATCH] Make queue scrollable --- static/style.css | 25 +++++++---- templates/index.html | 13 +++++- templates/player.html | 100 +++++++++++++++++++++--------------------- templates/queue.html | 12 +---- 4 files changed, 78 insertions(+), 72 deletions(-) diff --git a/static/style.css b/static/style.css index 15058cd..1e996f7 100644 --- a/static/style.css +++ b/static/style.css @@ -24,10 +24,6 @@ body { } } -body > div { - padding: 1rem; -} - button { background-color: transparent; border: none; @@ -70,11 +66,18 @@ ul { margin: 0; } +.player > .queue { + flex: 1; + display: flex; + flex-flow: column; +} + .queue-header { margin-top: 1.0rem; display: flex; align-items: center; } + .queue-next { font-weight: bold; flex: 1; @@ -82,29 +85,30 @@ ul { .queue { margin-top: 0.5rem; + overflow: auto; } -.queue li { +.queue ul li { padding: 0 0.5rem; border-radius: .25rem; display: flex; align-items: center; } -.queue li.playing { +.queue ul li.playing { background-color: #334; } @media (prefers-contrast: more) { - .queue li.playing { + .queue ul li.playing { background-color: black; border: 2px solid white; } } -.queue .metadata { +.queue ul .metadata { flex: 1; } -.queue .song__name { +.queue ul .song__name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; /* number of lines to show */ @@ -209,6 +213,9 @@ ul.dir li .material-symbols-outlined { .player { width: 25rem; + padding: 1rem 1rem 0; + display: flex; + flex-flow: column; } .player .nowplaying { diff --git a/templates/index.html b/templates/index.html index 448421a..a1d8a4f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -31,8 +31,17 @@ >
-
-
+
+ +
+
Next in queue
+ +
+ +
diff --git a/templates/player.html b/templates/player.html index 5a2826e..2b4b18a 100644 --- a/templates/player.html +++ b/templates/player.html @@ -1,62 +1,60 @@ {# #} -
-
- {% if let Some(song) = song %} -
- - Album art - -
- - - {% else %} - +
+ {% if let Some(song) = song %} +
+ + Album art + +
+ + - -
- - - {% if state == mpdrs::State::Play %} - - {% else %} - - {% endif %} - - + {% else %} + - -
+ {% endif %}
+
+ + + {% if state == mpdrs::State::Play %} + + {% else %} + + {% endif %} + + +
+ +
+