-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
326 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
::placeholder { | ||
color: var(--foreground-color); | ||
} | ||
|
||
::-webkit-scrollbar { | ||
display: none; | ||
} | ||
|
||
@font-face { | ||
font-family: "Instrument Sans"; | ||
src: url("InstrumentSans-Regular.ttf"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Instrument Sans Bold"; | ||
src: url("InstrumentSans-Bold.ttf"); | ||
} | ||
|
||
@font-face { | ||
font-family: "Instrument Sans Italic"; | ||
src: url("InstrumentSans-Italic.ttf"); | ||
} | ||
|
||
@keyframes fall-down { | ||
0% { | ||
opacity: 0%; | ||
height: 0px; | ||
} | ||
} | ||
|
||
::selection { | ||
background-color: transparent; | ||
} | ||
|
||
*.selectable::selection { | ||
background-color: var(--accent-color); | ||
} | ||
|
||
*:focus { | ||
outline: none; | ||
} | ||
|
||
* { | ||
cursor: default; | ||
} | ||
|
||
/* | ||
-- Login Box -- | ||
Width: 33vw | ||
Padding: 40px; | ||
Height: 100vh - 80 | ||
Margin-Top: 40px; | ||
*/ | ||
|
||
html { | ||
height: 100%; | ||
} | ||
|
||
body { | ||
background-color: var(--background-color); | ||
color: var(--foreground-color); | ||
font-family: "Instrument Sans", sans-serif; | ||
margin: 0px; | ||
height: 100%; | ||
} | ||
|
||
#lumos_title { | ||
position: fixed; | ||
top: 10px; | ||
left: 10px; | ||
opacity: 0.3; | ||
} | ||
|
||
#player_box { | ||
--width: 320px; | ||
--height: 400px; | ||
--pading: 20px; | ||
width: var(--width); | ||
height: var(--height); | ||
padding: var(--pading); | ||
position: fixed; | ||
top: calc(50vh - (var(--height) + var(--pading)) / 2); | ||
left: calc(50vw - (var(--width) + var(--pading)) / 2); | ||
background-color: var(--grey-1); | ||
border-radius: 15px; | ||
box-shadow: 0px 1px 0px 0px #A0A0A0 inset, 0px 5px 15px 0px rgba(0, 0, 0, 0.50); | ||
} | ||
|
||
#player_box img { | ||
filter: 0px 5px 15px 0px rgba(0, 0, 0, 0.50); | ||
} | ||
|
||
#song_title { | ||
font-size: large; | ||
max-width: 200px; | ||
margin: 10px; | ||
} | ||
|
||
#play_button { | ||
width: 60px; | ||
height: 60px; | ||
border-radius: 50%; | ||
font-size: 16px; | ||
margin-top: calc(25% - 10px); | ||
} | ||
|
||
#play_button img { | ||
width: 20px; | ||
padding-top: 2.5px; | ||
} | ||
|
||
@keyframes pulse { | ||
0% {} | ||
50% {filter: brightness(1.4);} | ||
100% {} | ||
} | ||
|
||
.pulse { | ||
animation-name: pulse; | ||
animation-duration: 0.5s; | ||
animation-iteration-count: infinite; | ||
} | ||
|
||
#scale_bg { | ||
border-radius: 2px; | ||
background-color: #efefef; | ||
width: 200px; | ||
height: 10px; | ||
box-shadow: 0px 1px 0px 0px #A0A0A0 inset, 0px 5px 15px 0px rgba(0, 0, 0, 0.50); | ||
} | ||
|
||
#scale_fg { | ||
border-radius: 2px; | ||
background-color: var(--accent-color); | ||
height: 10px; | ||
width: 0px; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Lumos</title> | ||
<link rel="stylesheet" href="/asset/musicplayer.css"> | ||
<meta http-equiv="cache-control" content="no-cache"> | ||
<link rel="stylesheet" href="/asset/themeoverride.css"> | ||
<link rel="stylesheet" href="/asset/lui.css"> | ||
<script> | ||
play_toggle = true; | ||
window.onload = function () { | ||
song_duration = document.getElementById("player").duration | ||
document.getElementById("play_button").onclick = function () { | ||
if (play_toggle) { | ||
document.getElementById("player").play() | ||
document.getElementById("play_button").innerHTML = "<img src=/asset/pause_button.svg>" | ||
document.getElementById("play_button").classList.add("pulse") | ||
upd = setInterval(() => { | ||
song_duration_percent = Math.floor((document.getElementById("player").currentTime / song_duration)*100) / 100 | ||
document.getElementById("scale_fg").style.width = ((song_duration_percent*200))+"px" | ||
if (song_duration_percent <= 0 && document.getElementById("player").currentTime > 3) { | ||
document.getElementById("player").pause() | ||
document.getElementById("play_button").innerHTML = "<img src=/asset/play_button.svg>" | ||
document.getElementById("play_button").classList.remove("pulse") | ||
clearInterval(upd) | ||
document.getElementById("player").currentTime = 0 | ||
} | ||
}, 100); | ||
} | ||
else { | ||
document.getElementById("player").pause() | ||
document.getElementById("play_button").innerHTML = "<img src=/asset/play_button.svg>" | ||
document.getElementById("play_button").classList.remove("pulse") | ||
clearInterval(upd) | ||
} | ||
play_toggle = !play_toggle | ||
|
||
} | ||
} | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<span id="lumos_title">Lumos</span> | ||
<div id="player_box"> | ||
<div align="center"> | ||
<h2>Music</h2><br> | ||
<img src="/asset/mime_video.svg" alt="Music" width="100"> | ||
<br><br> | ||
<span id="song_title"> {{ filename }} </span><br> | ||
<button id="play_button"><img src=/asset/play_button.svg></button> | ||
<audio src="{{ song_in_b64 }}" id="player" hidden></audio> | ||
<br><br> | ||
<div id="scale_bg" align="left"> | ||
<div id="scale_fg"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |