miru/app/css/player.css
2020-09-20 22:31:04 +02:00

265 lines
No EOL
5.1 KiB
CSS

:root {
font-family: -apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--accent-color: #e5204c;
--volume-level: 100%;
--progress: 0%;
--buffer: 0%;
--height: 0;
color: #b6b6b6;
--sidebar-width: 19rem;
--ts: "";
--miniplayer-display: flex;
}
/* NAVBAR */
.page-wrapper.with-sidebar[data-sidebar-hidden]>.sidebar {
left: calc(-1 *var(--sidebar-width));
}
/*PLAYER*/
#player:target {
bottom: 0;
right: 0;
position: relative;
align-self: center;
width: 100%;
height: 100%;
transition: none !important;
}
.immersed {
cursor: none;
}
.immersed .controls,
.immersed .stats {
opacity: 0;
}
#player {
position: fixed;
display: var(--miniplayer-display);
bottom: 2rem;
right: 2rem;
width: 25%;
transition: width .2s ease;
z-index: 10
}
#player:target>a {
display: none;
}
#player>a {
position: absolute;
z-index: 10
}
#dl{
display: none
}
#dl[download]{
display: block
}
#player:target .player {
display: flex !important
}
video[src=""] {
display: none;
}
video::cue {
background: none !important;
font-family: var(--sub-font);
color: #fff !important;
text-shadow: 2px 2px 0 #000,
2px -2px 0 #000,
-2px 2px 0 #000,
-2px -2px 0 #000,
2px 0px 0 #000,
0px 2px 0 #000,
-2px 0px 0 #000,
0px -2px 0 #000,
2px 2px 2px #000;
}
.controls {
background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .4) 25%, rgba(0, 0, 0, .2) 50%, rgba(0, 0, 0, .1) 75%, transparent);
transition: .5s opacity ease;
}
.stats {
background: linear-gradient(to bottom, rgba(0, 0, 0, .8), rgba(0, 0, 0, .4) 25%, rgba(0, 0, 0, .2) 50%, rgba(0, 0, 0, .1) 75%, transparent);
transition: .5s opacity ease;
}
.player {
position: absolute;
user-select: none;
opacity: 1;
font-family: Roboto,Arial,Helvetica,sans-serif
}
.controls>*:hover {
filter: drop-shadow(0 0 8px #000)
}
.controls span {
cursor: pointer
}
.stats .ts {
padding: 0 1.2rem 0 0 !important
}
.player span {
font-size: 2.2rem !important;
color: #ececec;
padding: 1.2rem;
transition: all .2s ease;
}
.player .ts {
font-size: 1.8rem !important;
white-space: nowrap;
align-self: center;
cursor: default;
padding: 0 1.2rem;
font-weight: 600
}
#progress {
width: 100%;
position: relative;
}
.volume {
display: flex;
width: auto
}
.volume:hover>input[type=range] {
width: 5vw;
display: inline-block;
transition: all .1s ease;
margin-right: 1rem
}
.volume>input[type=range] {
width: 0;
transition: all .1s ease;
margin-right: 0
}
.controls input[type=range] {
-webkit-appearance: none;
background: transparent;
margin: 0
}
.controls input[type=range]:focus {
outline: none;
}
.controls input#volume[type=range]::-webkit-slider-runnable-track {
width: 50%;
height: 3px;
cursor: pointer;
background: linear-gradient(90deg, #e5204c var(--volume-level), rgba(255, 255, 255, .2) var(--volume-level))
}
.controls input#progress[type=range]::-webkit-slider-runnable-track {
width: 50%;
height: 3px;
cursor: pointer;
background: linear-gradient(90deg, #e5204c var(--progress), rgba(255, 255, 255, .4) var(--progress), rgba(255, 255, 255, .4) var(--buffer), rgba(255, 255, 255, .2) var(--buffer))
}
.controls input#progress[type=range]::after,
.controls input#progress[type=range]::before {
pointer-events: none;
opacity: 0;
position: absolute;
transform: translate(-50%, -100%);
font-family: Roboto,Arial,Helvetica,sans-serif;
color: #ececec;
white-space: nowrap;
align-self: center;
padding: 0 1.2rem;
left: var(--left);
font-weight: 600;
transition: .2s opacity ease;
}
.controls input#progress[type=range]::after {
width: 150px;
background: var(--background);
content: "";
height: var(--height);
top: -2rem;
}
.ctrl[disabled] {
display: none;
}
.controls input#progress[type=range]::before {
top: .5rem;
content: attr(data-ts);
}
.controls input#progress[type=range]:active::after,
.controls input#progress[type=range]:active::before {
opacity: 1;
}
.controls input[type=range]:hover::-webkit-slider-thumb {
height: 12px;
width: 12px;
margin-top: -4px
}
.controls input[type=range]::-webkit-slider-thumb {
height: 0px;
width: 0px;
border-radius: 50%;
background: var(--accent-color);
cursor: pointer;
-webkit-appearance: none;
margin-top: 1px;
transition: all .1s ease
}
#nowPlayingDisplay {
padding-left: 1.2rem !important;
}
#buffering {
border: 4px solid #FFFFFF00;
border-top: 4px solid #fff;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
opacity: 1;
transition: .5s opacity ease;
}
#buffering.hidden {
opacity: 0
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}