aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorSamuel Johnson <[email protected]>2025-11-24 13:53:18 -0500
committerSamuel Johnson <[email protected]>2025-11-24 13:53:18 -0500
commit368a462bc744d8e9084eacfaddeb9afcaf7f7133 (patch)
treec6e8f665d6cb9713b9226b10c4a341e60b8e91c2 /static
parent4d4419f51557bef6b64dca8635ed61616d262a9b (diff)
Add session management
Diffstat (limited to 'static')
-rw-r--r--static/app.css45
-rw-r--r--static/music_player.js12
2 files changed, 50 insertions, 7 deletions
diff --git a/static/app.css b/static/app.css
index 0148d24..7b2d083 100644
--- a/static/app.css
+++ b/static/app.css
@@ -8,6 +8,7 @@ header {
header > h1 {
padding: 0.5rem;
+ font-size: 2rem;
}
header > nav {
@@ -16,8 +17,27 @@ header > nav {
margin-left: 2em;
}
-a {
+.flex-between {
+ display: flex;
+ flex-direction: row;
+}
+
+.spacer {
+ visibility: hidden;
+ flex-grow: 1;
+}
+
+.nav_tag {
margin: 0.5em;
+}
+
+.right {
+ float: right;
+ margin: auto;
+ margin-right: 2em;
+}
+
+a {
color: inherit;
position: relative;
display: inline-block;
@@ -50,7 +70,7 @@ a:hover::after {
.pane {
margin: auto;
- padding: 4px 10px;
+ padding: 0.2em 0.5em;
width: 75%;
background-color: black;
@@ -66,6 +86,7 @@ a:hover::after {
flex-direction: row;
justify-content: center;
align-content: center;
+ margin: 2em;
}
.topline > p {
@@ -74,6 +95,16 @@ a:hover::after {
margin-left: 2em;
}
+@media only screen and (max-width: 768px) {
+ header > h1 {
+ font-size: 1em;
+ }
+
+ .topline > p {
+ display: none;
+ }
+}
+
.card {
border-top: 1px solid #fff;
@@ -126,6 +157,16 @@ a:hover::after {
right: 0;
}
+.margin_2rem {
+ margin: 2rem;
+}
+
+.login_form {
+ margin-top: 2rem;
+ margin-bottom: 2rem;
+ padding: 0.5rem;
+}
+
.vert_align {
display: inline-block;
vertical-align: middle;
diff --git a/static/music_player.js b/static/music_player.js
index 8fe89c2..33063d1 100644
--- a/static/music_player.js
+++ b/static/music_player.js
@@ -45,7 +45,7 @@ function mpSeek () {
audio.currentTime = goal;
}
-async function mpUpdate () {
+async function mpInit () {
clearInterval(tick);
const trackSelector = document.getElementById("mp_tracks");
@@ -61,6 +61,10 @@ async function mpUpdate () {
ppButton.innerHTML = "<img src='/static/get?file=images/play.svg' alt='Play'>";
tick = setInterval(mpTick, 1000);
+}
+
+async function mpUpdate () {
+ mpInit();
mpPpTrack();
}
@@ -90,7 +94,6 @@ function mpNext () {
}
mpUpdate();
- mpPpTrack();
}
function mpPrevious () {
@@ -103,7 +106,6 @@ function mpPrevious () {
}
mpUpdate();
- mpPpTrack();
}
const trackList = await mpFetchAsync("/audio");
@@ -113,7 +115,7 @@ trackList.forEach((track) => {
let option = document.createElement("option");
option.text = track;
- trackSelector.add(option, 0);
+ trackSelector.append(option)
});
document.getElementById("mp_tracks").addEventListener("change", mpUpdate, false);
@@ -122,4 +124,4 @@ document.getElementById("mp_pp_track").addEventListener("click", mpPpTrack, fals
document.getElementById("mp_prev_track").addEventListener("click", mpPrevious, false);
document.getElementById("mp_next_track").addEventListener("click", mpNext, false);
-mpUpdate();
+mpInit();