From c3458caddc4ecb2d9e2fcade9c4b6af0af5b5700 Mon Sep 17 00:00:00 2001 From: Adler Luiz Date: Fri, 7 Aug 2020 21:53:55 -0300 Subject: [PATCH] :sparkles: Improve miniplayer --- src/pages/miniplayer/miniplayer.css | 29 ++++++++++++++--------------- src/pages/miniplayer/miniplayer.js | 2 -- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/pages/miniplayer/miniplayer.css b/src/pages/miniplayer/miniplayer.css index 9a70efeb5..7cacf961d 100644 --- a/src/pages/miniplayer/miniplayer.css +++ b/src/pages/miniplayer/miniplayer.css @@ -1,8 +1,3 @@ -body { - background-repeat: no-repeat; - background-size: 100vmin; -} - body:hover .player-info, body:hover .cmd-btn, body.showinfo .player-info, @@ -123,7 +118,6 @@ body.showinfo #background { } #content, -#background, #secondsEffect { position: absolute; top: 0; @@ -140,9 +134,23 @@ body.showinfo #background { background-repeat: no-repeat; background-size: cover; background-position: center; + position: absolute; + top: -1vmin; + left: -1vmin; + width: 102vmin; + height: 102vmin; z-index: 0; } +#loading { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + text-align: center; + z-index: 1; +} + #secondsEffect { display: none; } @@ -166,12 +174,3 @@ body.showinfo #background { transition-duration: 0.15s; transition-timing-function: ease-out; } - -#loading { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - - text-align: center; -} \ No newline at end of file diff --git a/src/pages/miniplayer/miniplayer.js b/src/pages/miniplayer/miniplayer.js index 9e639bff4..159e906f8 100644 --- a/src/pages/miniplayer/miniplayer.js +++ b/src/pages/miniplayer/miniplayer.js @@ -85,8 +85,6 @@ async function retrieveAllInfo() { function setPlayerInfo(data) { document.title = `${data.track.title} - ${data.track.author}` - - body.style.backgroundImage = `url(${data.track.cover})` background.style.backgroundImage = `url(${data.track.cover})` title.innerHTML = data.track.title || 'Title' author.innerHTML = data.track.author || 'Author'