Skip to content

Commit

Permalink
✨ Improve miniplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
adlerluiz committed Aug 8, 2020
1 parent 1d048e1 commit c3458ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
29 changes: 14 additions & 15 deletions src/pages/miniplayer/miniplayer.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
body {
background-repeat: no-repeat;
background-size: 100vmin;
}

body:hover .player-info,
body:hover .cmd-btn,
body.showinfo .player-info,
Expand Down Expand Up @@ -123,7 +118,6 @@ body.showinfo #background {
}

#content,
#background,
#secondsEffect {
position: absolute;
top: 0;
Expand All @@ -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;
}
Expand All @@ -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;
}
2 changes: 0 additions & 2 deletions src/pages/miniplayer/miniplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit c3458ca

Please sign in to comment.