feat: acrylic background

This commit is contained in:
Mateusz Pstrucha committed 2021-09-19 22:15:46 +02:00
1 parent 1dee5061a1
commit 38407959a6
7 files changed
+45 -17

No files matched your search

+2 -2
View File
@@ -18,10 +18,10 @@
.info-wrapper {
border-radius: 0.5em;
background: linear-gradient(180deg, white, transparent);
height: 100%;
padding: 1em;
box-shadow: 0 -1px 11px 2px #6b6b6b52;
background-color: hsl(var(--deg) 4% 98% / 70%);
}
.info-wrapper > .title {
@@ -31,7 +31,7 @@
.info-balance {
width: 100%;
font-size: 0.75em;
font-family: monospace;
background-color: var(--light);
margin: 1em 0;
display: flex;
+13 -8
View File
@@ -86,7 +86,7 @@ function Info() {
<div className="info-balance" disabled={total < 1}>
<div className="up" style={{ width: `${percent}%` }}>
{track.stats.up}&nbsp;
{track.stats.up}
</div>
<div className="down" style={{ width: `${100 - percent}%` }}>
{track.stats.down}
@@ -146,14 +146,19 @@ function Info() {
</span>
</div>
<div>
<i className="icon-thumbs-up"></i> Liczba głosów: {total}
</div>
{total > 0 && (
<div>
<i className="icon-thumbs-up"></i> Liczba głosów:&nbsp;
<strong>{total}</strong>
</div>
)}
<div>
<i className="icon-list-numbered"></i> Miejsce:&nbsp;
<span>#{track.stats.rank}</span>
</div>
{track.stats.rank > 0 && (
<div>
<i className="icon-list-numbered"></i> Miejsce:&nbsp;
<strong>#{track.stats.rank}</strong>
</div>
)}
{track.banned && (
<div>
-1
View File
@@ -3,7 +3,6 @@
.main {
height: 100vh;
justify-content: flex-end;
background-color: var(--light);
font-family: 'Quicksand';
overflow: hidden auto;
}
-1
View File
@@ -6,7 +6,6 @@ nav {
padding: 0.5em;
box-sizing: border-box;
user-select: none;
box-shadow: 0 0 12px 1px #0000002b, 0 -10px 20px 20px var(--light);
z-index: 5;
position: fixed;
bottom: 0;
+9 -3
View File
@@ -1,16 +1,19 @@
.status {
position: fixed;
bottom: 3.5rem;
left: 2.5%;
left: 0;
right: 0;
width: 95%;
background: var(--dark);
color: var(--white);
padding: 0.5em;
border-radius: 0.5em;
box-sizing: border-box;
box-shadow: 0 2px 8px 1px #00000063;
box-shadow: 0 2px 8px 1px #0006;
z-index: 10;
text-decoration: none;
max-width: 700px;
margin: auto;
}
.status-image {
@@ -25,6 +28,9 @@
font-size: 1.1em;
display: block;
font-weight: bold;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.status-artist {
@@ -47,7 +53,7 @@
bottom: 0;
border-bottom: 2px solid white;
border-radius: 2px;
transition: 0.5s linear width, 0.3s ease-out opacity;
transition: 1s linear width, 0.3s ease-out opacity;
}
.status-progress:after {
+7 -2
View File
@@ -2,6 +2,7 @@ import { useContext, useEffect, useState } from 'react'
import { Link } from 'react-router-dom'
import { setColor } from '../../Color'
import { socket } from '../../socket'
import PlayingContext from '../../contexts/Playing'
@@ -18,7 +19,7 @@ function Status({ progress, paused }) {
} = useContext(PlayingContext),
[elapsed, setElapsed] = useState()
const step = 500,
const step = 1e3,
tread = step / duration
useEffect(() => {
@@ -56,7 +57,11 @@ function Status({ progress, paused }) {
<img className="status-image" alt="album cover" src={album.art ?? def} />
<span className="status-track">{title}</span>
<span className="status-artist">{artists.join(', ')}</span>
<i className="icon-info"></i>
<i
className={`icon-${
socket.readyState === socket.OPEN ? 'info' : 'unlink'
}`}
></i>
<div
className="status-progress"
style={{ width: `calc(var(--max) * ${elapsed})` }}
+14
View File
@@ -5,6 +5,16 @@ body {
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-image: url('https://i1.wp.com/www.estidia.eu/wp-content/uploads/2018/04/Savin-NY-Website-Background-Web.jpg?fit=848%2C477');
background-size: cover;
background-color: var(--light);
background-blend-mode: multiply;
transition: background-color 0.5s;
}
#root {
backdrop-filter: blur(6px);
}
:root {
@@ -29,3 +39,7 @@ body {
background-color: var(--main);
}
}
strong {
font-weight: bold;
}