Moved some shit arouind

This commit is contained in:
nutty
2026-06-27 04:09:52 +10:00
parent de7b62e771
commit b1e6cb5d75
6 changed files with 30 additions and 57 deletions
+2 -29
View File
@@ -4,39 +4,12 @@
<title>Now Playing</title> <title>Now Playing</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="shortcut icon" href="#" /> <link rel="shortcut icon" href="#" />
<link id="theme-style" rel="stylesheet" href="./style.css" /> <link rel="stylesheet" href="./style.css" />
<link id="theme-style" rel="stylesheet" />
</head> </head>
<body> <body>
<div id="main-container"> <div id="main-container">
<!-- <div id="standard-layout">
<div id="album-art-container">
<div id="album-art-layer"></div>
<div id="album-art-transition-layer"></div>
</div>
<div id="song-info-container">
<div id="background-layer"></div>
<div id="background-transition-layer"></div>
<div id="song-info-wrapper">
<div id="track-label" class="text-label">&nbsp;</div>
<div id="artist-label" class="text-label">&nbsp;</div>
<div id="progress-container">
<div id="progress-bar-track">
<div id="progress-bar-fill"></div>
<div></div>
</div>
<div id="time-container">
<div id="current-time">0:00</div>
<div id="duration">0:00</div>
</div>
</div>
</div>
</div>
</div> -->
</div> </div>
</body> </body>
+8
View File
@@ -29,6 +29,14 @@ const displayDuration = GetIntParam("displayDuration", 5);
const showAnimation = urlParams.get('showAnimation') || 'fade'; const showAnimation = urlParams.get('showAnimation') || 'fade';
const hideAnimation = urlParams.get('hideAnimation') || 'fade'; const hideAnimation = urlParams.get('hideAnimation') || 'fade';
////////////////
// PAGE SETUP //
////////////////
// Set fonts for the widget
document.body.style.fontFamily = font;
document.body.style.fontSize = `${fontSize}px`;
//////////////// ////////////////
+13
View File
@@ -0,0 +1,13 @@
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
font-size: 20px;
color: white;
margin: 0;
}
#main-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh; /* Full viewport height */
}
+1 -5
View File
@@ -1,8 +1,4 @@
<head> <div id="main-wrapper">
<link rel="stylesheet" href="./style.css" />
</head>
<div id="standard-layout">
<div id="album-art-container"> <div id="album-art-container">
<div id="album-art-layer"></div> <div id="album-art-layer"></div>
<div id="album-art-transition-layer"></div> <div id="album-art-transition-layer"></div>
+5 -8
View File
@@ -10,7 +10,7 @@ let hideTimeout = null;
// PAGE ELEMENTS // // PAGE ELEMENTS //
/////////////////// ///////////////////
const standardLayout = document.getElementById('standard-layout'); const mainWrapper = document.getElementById('main-wrapper');
const albumArtContainer = document.getElementById('album-art-container'); const albumArtContainer = document.getElementById('album-art-container');
const songInfoContainer = document.getElementById('song-info-container'); const songInfoContainer = document.getElementById('song-info-container');
const albumArtLayer = document.getElementById('album-art-layer'); const albumArtLayer = document.getElementById('album-art-layer');
@@ -30,10 +30,7 @@ const durationLabel = document.getElementById('duration');
// PAGE SETUP // // PAGE SETUP //
//////////////// ////////////////
// Set fonts for the widget mainWrapper.style.width = `${width}px`;
document.body.style.fontFamily = font;
document.body.style.fontSize = `${fontSize}px`;
standardLayout.style.width = `${width}px`;
// Set album art style // Set album art style
switch (albumArt) switch (albumArt)
@@ -121,7 +118,7 @@ function UpdatePlayerState(data) {
// Set progressbar // Set progressbar
// Ensure we don't divide by zero or exceed 100% // Ensure we don't divide by zero or exceed 100%
const durationMs = timelineProps.EndTime; const durationMs = timelineProps.EndTime;
const progressPercent = durationMs > 0 ? (currentPositionMs / durationMs) * 100 : 0; let progressPercent = durationMs > 0 ? (currentPositionMs / durationMs) * 100 : 0;
progressPercent = Math.min(100, Math.max(0, progressPercent)); progressPercent = Math.min(100, Math.max(0, progressPercent));
progressBarFill.style.width = `${progressPercent}%`; progressBarFill.style.width = `${progressPercent}%`;
progressBarFill.style.setProperty('--accent-color', mediaProps.AccentColor); progressBarFill.style.setProperty('--accent-color', mediaProps.AccentColor);
@@ -147,7 +144,7 @@ function SetVisibility(visible) {
} }
if (visible) { if (visible) {
standardLayout.style.animation = `${showAnimation} 0.5s ease-out forwards`; mainWrapper.style.animation = `${showAnimation} 0.5s ease-out forwards`;
// Only set a new timer if autoHide is enabled // Only set a new timer if autoHide is enabled
if (autoHide) { if (autoHide) {
@@ -156,7 +153,7 @@ function SetVisibility(visible) {
}, displayDuration * 1000); }, displayDuration * 1000);
} }
} else { } else {
standardLayout.style.animation = `${hideAnimation} 0.5s ease-out forwards`; mainWrapper.style.animation = `${hideAnimation} 0.5s ease-out forwards`;
} }
} }
+1 -15
View File
@@ -1,18 +1,4 @@
body { #main-wrapper {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
font-size: 20px;
color: white;
margin: 0;
}
#main-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh; /* Full viewport height */
}
#standard-layout {
width: 500px; width: 500px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;