Basic Ambience Page WIP

This commit is contained in:
bingus_violet 2024-07-26 02:53:19 -05:00
parent 64fd713364
commit 14a5a6607d
3 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="../style.css">
<link rel="stylesheet" type="text/css" href="../subpage.css">
<link rel="stylesheet" href="./style.css">
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script src="./main.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Violet's Purgatory Ambient Page</title>
<meta name="darkreader-lock">
<meta content="Ambient Page - Violet's Purgatory" property="og:title" />
<meta content="This page isn't really made for public use. Ignore it!" property="og:description" />
<meta content="https://api.violets-purgatory.dev/v1/pfp" property="og:image" />
<meta content="#a200ff" data-react-helmet="true" name="theme-color" />
</head>
<body>
{WEATHER_MODIFIER}
<div class="mainDiv">
<h1 id="time">00:00</h1>
<div id="activityHtml">
{ACTIVITIES}
</div>
{SELECTED_VIDEO}
</div>
</body>
</html>

22
static/ambience/main.js Normal file
View file

@ -0,0 +1,22 @@
function loop() {
var date = new Date()
var hour = date.getHours();
hour = (hour < 10 ? "0" : "") + hour;
var min = date.getMinutes();
min = (min < 10 ? "0" : "") + min;
var sec = date.getSeconds();
sec = (sec < 10 ? "0" : "") + sec;
$("#time").text(hour + ":" + min)
setTimeout(() => {
loop()
}, 1000)
}
window.onload = () => {
loop()
}

19
static/ambience/style.css Normal file
View file

@ -0,0 +1,19 @@
body {
background-image: none;
background-color: black;
display: flex;
align-items: center;
margin: auto;
}
@media screen and (min-height: 500px) {
html,
body {
height: 100%;
}
}
#time {
font-size: 5rem;
}