Compare commits

...

9 commits

Author SHA1 Message Date
d7dccca810 Test commit again 2024-08-08 19:08:39 -05:00
439cfec97b Test 2024-08-08 19:07:39 -05:00
bd0e3900dd Test 2024-08-08 18:54:00 -05:00
cefb365f66 Fix items with no URL in socials 2024-08-08 10:09:21 -05:00
d379475b45 Fix page not working 2024-07-26 03:16:39 -05:00
cce0e075e6 Remove Video 2024-07-26 03:01:52 -05:00
1fadd74918 Add Fullscreening 2024-07-26 03:00:56 -05:00
14a5a6607d Basic Ambience Page WIP 2024-07-26 02:53:19 -05:00
64fd713364 Add .css 2024-07-26 02:30:42 -05:00
8 changed files with 130 additions and 6 deletions

View file

@ -17,7 +17,7 @@ These highlighted words ARE case senstive. You can make them not case sensitive
Highlighted words will automatically highlight adjacent letters. So, for example, `NodeJS-generated` will all be highlighted green, as `NodeJS` is a keyword.
If a highlighted word finds adjacent paranthesis, then the entire parenthesis will be highlighted.
For example `(Godot Engine is super cool)` will all be highlighted blue. So will `(My favorite utoid is Teto)`. But, on the other hand, `(Don't you think Javascript sucks?)` will only have `Javascript` highlighted.
For example `(Godot Engine is super cool)` will all be highlighted blue. So will `(My favorite UTAUloid is Teto)`. But, on the other hand, `(Don't you think Javascript sucks?)` will only have `Javascript` highlighted.
### Dynamic HTML
In `pageUpdater.js`, is a dictionary that specifies keywords to look for. Then, if it finds those keywords, and replaces them with HTML.

View file

@ -335,6 +335,7 @@
{
"words": [
"CSS",
".css",
"Neow",
"The Defect"
],

View file

@ -51,6 +51,14 @@ function firstToUpper(str) {
return str.charAt(0).toUpperCase() + str.slice(1)
}
function onlyIfExists(string, check) {
if (check) {
return string
} else {
return ""
}
}
function makeHtmlSafe(str) {
return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}
@ -299,9 +307,8 @@ function converter(html, dynamic = true) {
for (var x = 0; x < sitesTable.length; x++) {
var siteName = sitesTable[x]
var siteData = sites[siteName]
if (siteData.url) {
html += `<a class="chip" href="${siteData.url}">${siteName}: ${siteData.name.replaceAll("Violet", "{Violet}")}</a>`
}
html += `<a class="chip" ${onlyIfExists(`href="${siteData.url}"`, siteData.url)}>${siteName}: ${siteData.name.replaceAll("Violet", "{Violet}")}</a>`
}
html += "</div></div>"
}

View file

@ -0,0 +1,32 @@
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)
}
document.addEventListener("DOMContentLoaded", function() {
loop()
})
$(document).on('keypress',function(e) {
if(e.which == 102) {
if ($.fullscreen.isFullScreen()) {
$.fullscreen.exit()
} else {
$("body").fullscreen()
}
}
});

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,37 @@
<!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="./fullscreen.js"></script>
<script src="./ambient.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>
</div>
</body>
</html>

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;
}

View file

@ -154,7 +154,7 @@ window.onbeforeunload = function () {
window.scrollTo(0, 0);
}
window.onload = function () {
document.addEventListener("DOMContentLoaded", function() {
$("#jsEnabled").text("true")
pfp = $(".pfp")
@ -191,7 +191,7 @@ window.onload = function () {
}
}
socketeer()
}
})
var lastPong = Date.now()