diff --git a/assets/fonts/rubik-v28-latin-600.woff2 b/assets/fonts/rubik-v28-latin-600.woff2 deleted file mode 100644 index b1afae7..0000000 Binary files a/assets/fonts/rubik-v28-latin-600.woff2 and /dev/null differ diff --git a/constants.json b/constants.json index 94a5611..e1f0b65 100644 --- a/constants.json +++ b/constants.json @@ -1,4 +1,8 @@ { + "activityImages": { + "ULTRAKILL": "https://fs.violets-purgatory.dev/SiteActivityImages/ULTRAKILL.jpg", + "Phasmophobia": "https://fs.violets-purgatory.dev/SiteActivityImages/Phasmophobia.png" + }, "discStatuses": { "online": { "text": "Online", @@ -20,7 +24,7 @@ "quotes": [ "Remember the 14th commandment: Thou shalt always clean thy plate and not waste anything, whether thy stomach is full, or not.", "I hate javascript!!!", - "Happy 400 500 commits!", + "Happy {COMMIT_COUNT} commits!", "Play Cave Story!", "Cave Story+ Sucks!", "World's Worst Developer", @@ -50,21 +54,17 @@ "Godot Engine": "#64B5F6", "Javascript": "yellow", "NodeJS": "limegreen", - "Violets-Purgatory": "rgb(200, 150, 255)", - "Violets-Cache": "rgb(200, 150, 255)", "Violet's": "rgb(200, 150, 255)", - "Violets": "rgb(200, 150, 255)", "Violet": "rgb(200, 150, 255)", - "Purgatory": "rgb(200, 150, 255)", "Asahi": "rgb(255, 175, 175)", "Lunya": "rgb(255, 175, 175)", "bisexual": "rgb(214, 2, 112)", "enby": "rgb(252, 244, 52)", + "Purgatory": "rgb(200, 150, 255)", "Youtube": "rgb(255, 0, 0)", "Fedi": "rgb(175, 125, 200)", "Matrix": "limegreen", "Element": "rgb(100, 255, 200)", - "Code": "rgb(150, 175, 255)", "Codeberg": "rgb(0, 255, 255)", "Docker": "blue", "Github": "gray", @@ -79,8 +79,6 @@ "Forgejo": "orange", "HTML": "orange", "CSS": "rgb(50, 200, 255)", - "Thumbor": "rgb(225, 225, 255)", - "Spotify": "limegreen", - "Ultrakill": "red" + "Thumbor": "rgb(225, 225, 255)" } } \ No newline at end of file diff --git a/output.json b/output.json deleted file mode 100644 index 05ae4e9..0000000 --- a/output.json +++ /dev/null @@ -1,2153 +0,0 @@ -[ - { - "type": "element", - "tagName": "!doctype", - "attributes": [ - { - "key": "html", - "value": null - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "html", - "attributes": [ - { - "key": "lang", - "value": "en" - } - ], - "children": [ - { - "type": "element", - "tagName": "head", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "link", - "attributes": [ - { - "key": "rel", - "value": "stylesheet" - }, - { - "key": "type", - "value": "text/css" - }, - { - "key": "href", - "value": "./style.css" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "link", - "attributes": [ - { - "key": "rel", - "value": "stylesheet" - }, - { - "key": "type", - "value": "text/css" - }, - { - "key": "href", - "value": "./root.css" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "noscript", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "link", - "attributes": [ - { - "key": "rel", - "value": "stylesheet" - }, - { - "key": "href", - "value": "./noScript.css" - } - ], - "children": [] - } - ] - }, - { - "type": "element", - "tagName": "script", - "attributes": [ - { - "key": "src", - "value": "./main.js" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "meta", - "attributes": [ - { - "key": "charset", - "value": "UTF-8" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "meta", - "attributes": [ - { - "key": "name", - "value": "viewport" - }, - { - "key": "content", - "value": "width=device-width, initial-scale=1.0" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "title", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Violet's Purgatory" - } - ] - }, - { - "type": "element", - "tagName": "meta", - "attributes": [ - { - "key": "name", - "value": "darkreader-lock" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "meta", - "attributes": [ - { - "key": "content", - "value": "Violet's Purgatory" - }, - { - "key": "property", - "value": "og:title" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "meta", - "attributes": [ - { - "key": "content", - "value": "Hi, I'm Violet, a 15 year old web & game developer. My site has info about me, so please visit!" - }, - { - "key": "property", - "value": "og:description" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "meta", - "attributes": [ - { - "key": "content", - "value": "https://api.violets-purgatory.dev/v1/pfp" - }, - { - "key": "property", - "value": "og:image" - } - ], - "children": [] - }, - { - "type": "element", - "tagName": "meta", - "attributes": [ - { - "key": "content", - "value": "#a200ff" - }, - { - "key": "data-react-helmet", - "value": "true" - }, - { - "key": "name", - "value": "theme-color" - } - ], - "children": [] - } - ] - }, - { - "type": "element", - "tagName": "body", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "h1", - "attributes": [ - { - "key": "class", - "value": "animatedTitle" - } - ], - "children": [ - { - "type": "text", - "content": "Welcome to " - }, - { - "type": "element", - "tagName": "span", - "attributes": [ - { - "key": "class", - "value": "mainTitle" - } - ], - "children": [ - { - "type": "text", - "content": "Violet's Purgatory" - } - ] - }, - { - "type": "element", - "tagName": "span", - "attributes": [ - { - "key": "class", - "value": "note" - } - ], - "children": [ - { - "type": "text", - "content": "Commit 511" - } - ] - } - ] - }, - { - "type": "element", - "tagName": "main", - "attributes": [ - { - "key": "class", - "value": "animatedMain" - } - ], - "children": [ - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Make sure to check out this project on " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "href", - "value": "https://git.violets-purgatory.dev/bingus_violet/violets-purgatory" - } - ], - "children": [ - { - "type": "text", - "content": "Forgejo" - } - ] - }, - { - "type": "text", - "content": "!" - } - ] - }, - { - "type": "element", - "tagName": "hr", - "attributes": [], - "children": [] - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "id", - "value": "card" - } - ], - "children": [ - { - "type": "element", - "tagName": "h2", - "attributes": [], - "children": [ - { - "type": "text", - "content": "{Violet}" - } - ] - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "style", - "value": "display:flex;justify-content:center;align-items:center" - } - ], - "children": [ - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "style", - "value": "width:50%" - } - ], - "children": [ - { - "type": "element", - "tagName": "img", - "attributes": [ - { - "key": "draggable", - "value": "false" - }, - { - "key": "src", - "value": "https://api.violets-purgatory.dev/v1/pfp" - }, - { - "key": "class", - "value": "pfp" - } - ], - "children": [] - } - ] - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "style", - "value": "width:50%" - } - ], - "children": [ - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "style", - "value": "float:left" - } - ], - "children": [ - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "They/Them" - } - ] - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Developer" - } - ] - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "span", - "attributes": [ - { - "key": "style", - "value": "color: rgb(100, 255, 100);" - }, - { - "key": "class", - "value": "statusColor" - } - ], - "children": [ - { - "type": "text", - "content": "Online" - } - ] - }, - { - "type": "element", - "tagName": "style", - "attributes": [], - "children": [ - { - "type": "text", - "content": ".pfp { border-color: rgb(100, 255, 100) }" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "p", - "attributes": [ - { - "key": "class", - "value": "noscript" - } - ], - "children": [ - { - "type": "text", - "content": "Violet has been spun 17 times!" - } - ] - }, - { - "type": "element", - "tagName": "p", - "attributes": [ - { - "key": "class", - "value": "spinnyCount" - }, - { - "key": "style", - "value": "display:none" - } - ], - "children": [ - { - "type": "text", - "content": "You have spun Violet " - }, - { - "type": "element", - "tagName": "span", - "attributes": [ - { - "key": "class", - "value": "localSpins" - } - ], - "children": [ - { - "type": "text", - "content": "4" - } - ] - }, - { - "type": "text", - "content": " times!" - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "Everyone has spun Violet " - }, - { - "type": "element", - "tagName": "span", - "attributes": [ - { - "key": "class", - "value": "globalSpins" - } - ], - "children": [ - { - "type": "text", - "content": "17" - } - ] - }, - { - "type": "text", - "content": " times!" - } - ] - }, - { - "type": "element", - "tagName": "hr", - "attributes": [], - "children": [] - }, - { - "type": "element", - "tagName": "div", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "p", - "attributes": [ - { - "key": "style", - "value": "padding:10px" - } - ], - "children": [ - { - "type": "text", - "content": "Hi! I'm Violet, a 15 year old web and game developer. I make server-sided dynamic websites, with no Javascript required! I'm currently making games in the Godot Engine, and my dynamic sites in NodeJS." - } - ] - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "linkContainer" - } - ], - "children": [ - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "./socials/" - } - ], - "children": [ - { - "type": "text", - "content": "Socials" - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://blog.violets-purgatory.dev" - } - ], - "children": [ - { - "type": "text", - "content": "Blog" - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "./faq" - } - ], - "children": [ - { - "type": "text", - "content": "Nerd FAQ" - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://{BRANCH_SUB}violets-purgatory.dev" - } - ], - "children": [ - { - "type": "text", - "content": "Beta site" - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://fs.violets-purgatory.dev" - } - ], - "children": [ - { - "type": "text", - "content": "FileShare" - } - ] - } - ] - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "customStatus" - } - ], - "children": [] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "World's Worst Developer" - } - ] - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "id", - "value": "activityHtml" - } - ], - "children": [ - { - "type": "element", - "tagName": "h2", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "hr", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "What I'm up to:" - } - ] - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "activity-container" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "chip activity grid-child" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "img", - "attributes": [ - { - "key": "src", - "value": "/cached/24681403300.png" - }, - { - "key": "title", - "value": "TOHO BOSSA NOVA 2" - } - ], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "\n Listening to Spotify\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": " Song: タイニーリトル・アジアンタム\n \n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": " Album: TOHO BOSSA NOVA 2\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": " Artist: ShibayanRecords\n \n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "span", - "attributes": [ - { - "key": "class", - "value": "lengthBar lengthBar0" - } - ], - "children": [ - { - "type": "element", - "tagName": "span", - "attributes": [], - "children": [] - } - ] - }, - { - "type": "text", - "content": "\n 5:51\n " - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "style", - "attributes": [], - "children": [ - { - "type": "text", - "content": "\n \n .lengthBar0 > span {\n animation-name: songSlider0;\n animation-duration: 261s;\n animation-timing-function: linear;\n }\n \n @keyframes songSlider0 {\n 0% {\n width: 25.66894586894587%;\n }\n 100% {\n width: 100%;\n }\n }\n " - } - ] - }, - { - "type": "text", - "content": "\n \n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "chip activity grid-child" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "img", - "attributes": [ - { - "key": "src", - "value": "/cached/28034009225.png" - }, - { - "key": "title", - "value": "Editing a JS file" - } - ], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "img", - "attributes": [ - { - "key": "class", - "value": "smallimg" - }, - { - "key": "src", - "value": "/cached/5034082571.png" - }, - { - "key": "title", - "value": "VSCodium" - } - ], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "\n Playing " - }, - { - "type": "element", - "tagName": "span", - "attributes": [ - { - "key": "style", - "value": "color: rgb(255, 100, 150);" - } - ], - "children": [ - { - "type": "text", - "content": "Code" - } - ] - }, - { - "type": "text", - "content": " \n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "In Violets-Purgatory - 0 problems found\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "Working on pageUpdater.js:169:62\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": " 3 hours and 33 minutes\n " - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - } - ] - }, - { - "type": "comment", - "content": "


Announcement!

\n

Blah blah blah blah...

" - }, - { - "type": "element", - "tagName": "h2", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "hr", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "Services" - } - ] - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "List of services for public use hosted on Violet's Purgatory." - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "href", - "value": "https://sxng.violets-purgatory.dev" - }, - { - "key": "class", - "value": "chip" - } - ], - "children": [ - { - "type": "text", - "content": "SearXNG: sxng.violets-purgatory.dev" - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - } - ], - "children": [ - { - "type": "text", - "content": "Matrix: matrix.violets-purgatory.dev" - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "href", - "value": "https://element.violets-purgatory.dev" - }, - { - "key": "class", - "value": "chip" - } - ], - "children": [ - { - "type": "text", - "content": "Element: element.violets-purgatory.dev" - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "href", - "value": "https://git.violets-purgatory.dev" - }, - { - "key": "class", - "value": "chip" - } - ], - "children": [ - { - "type": "text", - "content": "Forgejo: git.violets-purgatory.dev (contact me for an account)" - } - ] - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - } - ], - "children": [ - { - "type": "text", - "content": "Thumbor: thumbor.violets-purgatory.dev" - } - ] - }, - { - "type": "element", - "tagName": "hr", - "attributes": [], - "children": [] - }, - { - "type": "element", - "tagName": "h1", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Socials" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Here's most of the sites you can find me on-" - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "if you needed that for some reason?" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "grid-container" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "grid-child" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "h3", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Social Media" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://floofy.city/@bingus_violet" - }, - { - "key": "rel", - "value": "me" - } - ], - "children": [ - { - "type": "text", - "content": "Fedi: bingus_violet​@floofy.city" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://www.youtube.com/channel/UChcrBJNJLZucy3TPyGyAY2g" - } - ], - "children": [ - { - "type": "text", - "content": "Youtube: {Violet}'s Fiasco" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://ko-fi.com/bingus_violet" - } - ], - "children": [ - { - "type": "text", - "content": "Ko-fi: Bingus_{Violet}" - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "grid-child" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "h3", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Chat" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://matrix.to/#/@bingus_violet:matrix.violets-purgatory.dev" - } - ], - "children": [ - { - "type": "text", - "content": "Matrix: @bingus_violet:​matrix.violets-purgatory.dev" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - } - ], - "children": [ - { - "type": "text", - "content": "Discord: bingus_violet" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - } - ], - "children": [ - { - "type": "text", - "content": "Revolt: Bingus{Violet}#5573" - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "grid-child" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "h3", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Coding" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://git.violets-purgatory.dev/bingus_violet/" - } - ], - "children": [ - { - "type": "text", - "content": "Forgejo: bingus_violet (git.violets-purgatory.dev)" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://codeberg.org/Bingus_violet" - } - ], - "children": [ - { - "type": "text", - "content": "Codeberg: bingus_violet" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://hub.docker.com/u/bingusviolet" - } - ], - "children": [ - { - "type": "text", - "content": "Docker: bingusviolet" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://github.com/violets-puragtory" - } - ], - "children": [ - { - "type": "text", - "content": "Github: violets-puragtory" - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [ - { - "key": "class", - "value": "grid-child" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "div", - "attributes": [], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "h3", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Games" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "a", - "attributes": [ - { - "key": "class", - "value": "chip" - }, - { - "key": "href", - "value": "https://steamcommunity.com/id/violet-The-Thigh-high-obtainer/" - } - ], - "children": [ - { - "type": "text", - "content": "Steam: {Violet}" - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "element", - "tagName": "h1", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "hr", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "FAQ" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "h3", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Why are so many words colored?" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "I like the way it looks to have certain words be highlighted, makes it look fancier and easier to read (imo). So, when I remade this site, I went ahead and added an " - }, - { - "type": "element", - "tagName": "em", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Automatic Word Highlighting System!" - } - ] - }, - { - "type": "text", - "content": " This allows me have words automatically highlighted, on the server side, without having to do it in the code manually. Here's the current list of highlighted words:" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "p", - "attributes": [ - { - "key": "class", - "value": "textBlock" - } - ], - "children": [ - { - "type": "text", - "content": "birds, Pissing, Starwalker, word highlighting, replaceAll, Godot Engine, Javascript, NodeJS, Violet's, Violet, Asahi, Lunya, bisexual, enby, Purgatory, Youtube, Fedi, Matrix, Element, Codeberg, Docker, Github, Steam, Univerter, Ko-fi, Revolt, Discord, SearXNG, Highlighting, highlighted, Forgejo, HTML, CSS, Thumbor" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "h3", - "attributes": [], - "children": [ - { - "type": "text", - "content": "I thought the site doesn't use Javascript? So why is it there?" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Originally, all my sites were completely Javascript free. As of late, though, I decided to add Javascript to this one. Javascript will " - }, - { - "type": "element", - "tagName": "b", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "em", - "attributes": [], - "children": [ - { - "type": "text", - "content": "NEVER" - } - ] - } - ] - }, - { - "type": "text", - "content": " be a requirement on this site. Javascript will ONLY be used where nessacary, and I will do everything possible to make the experience indistinguishable." - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "h2", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "hr", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "Random video!" - } - ] - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [ - { - "type": "text", - "content": "I would call it random " - }, - { - "type": "element", - "tagName": "em", - "attributes": [], - "children": [ - { - "type": "text", - "content": "daily" - } - ] - }, - { - "type": "text", - "content": " video but its not at all daily..." - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": " \n " - }, - { - "type": "element", - "tagName": "video", - "attributes": [ - { - "key": "controls", - "value": "true" - }, - { - "key": "src", - "value": "https://fs.violets-purgatory.dev/Clips/Deep%20Rock%20Galactic/Teamwork.mp4" - } - ], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "h1", - "attributes": [], - "children": [ - { - "type": "element", - "tagName": "hr", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "Stats" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "ul", - "attributes": [], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "li", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Page generation time: {LOAD_TIME}" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "li", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Uptime: about 1 seconds" - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "li", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Total reloads: 1 " - }, - { - "type": "element", - "tagName": "sup", - "attributes": [], - "children": [ - { - "type": "text", - "content": "*1" - } - ] - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "li", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Cached Images: 3 " - }, - { - "type": "element", - "tagName": "sup", - "attributes": [], - "children": [ - { - "type": "text", - "content": "*2" - } - ] - } - ] - }, - { - "type": "text", - "content": "\n " - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "ol", - "attributes": [ - { - "key": "class", - "value": "noteList" - } - ], - "children": [ - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "li", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Increments by 1 " - }, - { - "type": "element", - "tagName": "em", - "attributes": [], - "children": [ - { - "type": "text", - "content": "EVERY" - } - ] - }, - { - "type": "text", - "content": " time " - }, - { - "type": "element", - "tagName": "em", - "attributes": [], - "children": [ - { - "type": "text", - "content": "ANY" - } - ] - }, - { - "type": "text", - "content": " page is loaded." - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "li", - "attributes": [], - "children": [ - { - "type": "text", - "content": "Cached Images are cleared on server restart." - } - ] - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "text", - "content": "\n " - }, - { - "type": "element", - "tagName": "p", - "attributes": [], - "children": [] - }, - { - "type": "element", - "tagName": "br", - "attributes": [], - "children": [] - } - ] - } - ] - } - ] - } - ] - } -] \ No newline at end of file diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index 41ffe00..5142ef1 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -28,10 +28,6 @@ function get_img_url(activity, size = "large_image") { return null } -function makeCompat(string) { - return string.replaceAll("<", "<").replaceAll(">", ">") -} - function timeFormatter(seconds) { seconds = Math.ceil(seconds) var minutes = Math.floor(seconds / 60) @@ -41,6 +37,7 @@ function timeFormatter(seconds) { } else { return `${minutes}:${seconds % 60}` } + } function gameTimeFormatter(seconds) { @@ -57,14 +54,6 @@ function gameTimeFormatter(seconds) { } -function onlyIfExists(string, check) { - if (check) { - return string - } else { - return "" - } -} - module.exports = { activitiesToHTML: (lanyardData, cachedImages) => { var debounce = false @@ -94,23 +83,26 @@ module.exports = { function get_img(activity, size = "large_image") { - return "https://cache.violets-purgatory.dev/cached/" + get_img_url(activity, size) + if (cachedImages[get_img_url(activity, size)]) { + var fn = cachedImages[get_img_url(activity, size)] + var fp = path.join(__dirname, 'cached', fn) + } else { + return '/imgs/notFound.png' + } + + return '/cached/' + fn } function songStats() { var html = `` - if (activity.assets && activity.assets.large_text != activity.details && activity.state.length + activity.assets.large_text.length < 100) { + if (activity.assets && activity.assets.large_text != activity.details) { html += ` -
Album: ${makeCompat(activity.assets.large_text || " ")} -
Artist: ${makeCompat(activity.state || " ")} +
Album: ${activity.assets.large_text || " "} +
Artist: ${activity.state || " "} ` } else { - html += "
" - if (activity.state.includes(";")) - { html += "Artists: " } - else { html += "Artist: " } - html += `${makeCompat(activity.state || " ")}` + html += `
Artist: ${activity.state || " "}` } return html @@ -122,8 +114,8 @@ module.exports = {

- Listening to ${activity.name} -
Song: ${makeCompat(activity.details || " ")} + Listening to ${activity.name} +
Song: ${activity.details || " "} ${songStats()}
@@ -148,7 +140,7 @@ module.exports = { } ` - } else if (activity.type == 0 && activity.assets) { + } else if (activity.type == 0) { var time = activity.created_at if (activity.timestamps) { time = activity.timestamps.start @@ -170,14 +162,14 @@ module.exports = { ${smch()}

- Playing ${activity.name} - ${onlyIfExists("
" + (activity.details || activity.assets.large_text), activity.details || activity.assets.large_text)} - ${onlyIfExists("
" + (activity.state || activity.assets.small_text), activity.state || activity.assets.small_text)} + Playing ${activity.name} +
${(activity.details || activity.assets.large_text || " ")} +
${(activity.state || activity.assets.small_text || " ")}
${gameTimeFormatter((Date.now() - time) / 1000)}

` - } else if (activity.type != 4 && activity.assets) { + } else if (activity.type != 4) { var time = activity.created_at if (activity.timestamps) { time = activity.timestamps.start diff --git a/package-lock.json b/package-lock.json index 4a561cc..974a3de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@node-minify/core": "^8.0.6", - "@node-minify/uglify-js": "^8.0.6", "express": "^4.18.2", - "himalaya": "^1.1.0", "minify-html": "^0.0.2", "ws": "^8.16.0", "youtubei.js": "^9.0.2" @@ -26,45 +23,6 @@ "node": ">=14" } }, - "node_modules/@node-minify/core": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@node-minify/core/-/core-8.0.6.tgz", - "integrity": "sha512-/vxN46ieWDLU67CmgbArEvOb41zlYFOkOtr9QW9CnTrBLuTyGgkyNWC2y5+khvRw3Br58p2B5ZVSx/PxCTru6g==", - "license": "MIT", - "dependencies": { - "@node-minify/utils": "8.0.6", - "glob": "9.3.5", - "mkdirp": "1.0.4" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@node-minify/uglify-js": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@node-minify/uglify-js/-/uglify-js-8.0.6.tgz", - "integrity": "sha512-t6NNJwqnCwfFbbYOKv9bY3v43DcEkIUq4aaj4gtElJnx9tQaELiI0vsX9WuvQFrJlRI1xAwiNzYc+U05PWpscw==", - "license": "MIT", - "dependencies": { - "@node-minify/utils": "8.0.6", - "uglify-js": "3.17.4" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@node-minify/utils": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@node-minify/utils/-/utils-8.0.6.tgz", - "integrity": "sha512-csY4qcR7jUwiZmkreNTJhcypQfts2aY2CK+a+rXgXUImZiZiySh0FvwHjRnlqWKvg+y6ae9lHFzDRjBTmqlTIQ==", - "license": "MIT", - "dependencies": { - "gzip-size": "6.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -93,12 +51,6 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" - }, "node_modules/body-parser": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", @@ -122,15 +74,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -157,18 +100,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/clean-css": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", - "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", - "license": "MIT", - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 4.0" - } - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -242,12 +173,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "license": "MIT" - }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -367,12 +292,6 @@ "node": ">= 0.6" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC" - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -399,24 +318,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/glob": { - "version": "9.3.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", - "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -428,21 +329,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "license": "MIT", - "dependencies": { - "duplexer": "^0.1.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -487,12 +373,6 @@ "node": ">= 0.4" } }, - "node_modules/himalaya": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/himalaya/-/himalaya-1.1.0.tgz", - "integrity": "sha512-LLase1dHCRMel68/HZTFft0N0wti0epHr3nNY7ynpLbyZpmrKMQ8YIpiOV77TM97cNpC8Wb2n6f66IRggwdWPw==", - "license": "ISC" - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -543,15 +423,6 @@ "acorn": "^8.8.0" } }, - "node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -612,40 +483,15 @@ "uglify-es": "3.x.x" } }, - "node_modules/minimatch": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", - "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", - "license": "ISC", + "node_modules/minify-html/node_modules/clean-css": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", + "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", "dependencies": { - "brace-expansion": "^2.0.1" + "source-map": "~0.6.0" }, "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" + "node": ">= 4.0" } }, "node_modules/ms": { @@ -688,31 +534,6 @@ "node": ">= 0.8" } }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -932,18 +753,6 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==" }, - "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "license": "BSD-2-Clause", - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/undici": { "version": "5.28.4", "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", @@ -1019,33 +828,6 @@ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==" }, - "@node-minify/core": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@node-minify/core/-/core-8.0.6.tgz", - "integrity": "sha512-/vxN46ieWDLU67CmgbArEvOb41zlYFOkOtr9QW9CnTrBLuTyGgkyNWC2y5+khvRw3Br58p2B5ZVSx/PxCTru6g==", - "requires": { - "@node-minify/utils": "8.0.6", - "glob": "9.3.5", - "mkdirp": "1.0.4" - } - }, - "@node-minify/uglify-js": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@node-minify/uglify-js/-/uglify-js-8.0.6.tgz", - "integrity": "sha512-t6NNJwqnCwfFbbYOKv9bY3v43DcEkIUq4aaj4gtElJnx9tQaELiI0vsX9WuvQFrJlRI1xAwiNzYc+U05PWpscw==", - "requires": { - "@node-minify/utils": "8.0.6", - "uglify-js": "3.17.4" - } - }, - "@node-minify/utils": { - "version": "8.0.6", - "resolved": "https://registry.npmjs.org/@node-minify/utils/-/utils-8.0.6.tgz", - "integrity": "sha512-csY4qcR7jUwiZmkreNTJhcypQfts2aY2CK+a+rXgXUImZiZiySh0FvwHjRnlqWKvg+y6ae9lHFzDRjBTmqlTIQ==", - "requires": { - "gzip-size": "6.0.0" - } - }, "accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -1065,11 +847,6 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, "body-parser": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", @@ -1089,14 +866,6 @@ "unpipe": "1.0.0" } }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "requires": { - "balanced-match": "^1.0.0" - } - }, "bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -1114,14 +883,6 @@ "set-function-length": "^1.2.1" } }, - "clean-css": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", - "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", - "requires": { - "source-map": "~0.6.0" - } - }, "content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1173,11 +934,6 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" - }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -1273,11 +1029,6 @@ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -1295,17 +1046,6 @@ "hasown": "^2.0.0" } }, - "glob": { - "version": "9.3.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", - "integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==", - "requires": { - "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" - } - }, "gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -1314,14 +1054,6 @@ "get-intrinsic": "^1.1.3" } }, - "gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "requires": { - "duplexer": "^0.1.2" - } - }, "has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", @@ -1348,11 +1080,6 @@ "function-bind": "^1.1.2" } }, - "himalaya": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/himalaya/-/himalaya-1.1.0.tgz", - "integrity": "sha512-LLase1dHCRMel68/HZTFft0N0wti0epHr3nNY7ynpLbyZpmrKMQ8YIpiOV77TM97cNpC8Wb2n6f66IRggwdWPw==" - }, "http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -1391,11 +1118,6 @@ "acorn": "^8.8.0" } }, - "lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==" - }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -1436,26 +1158,18 @@ "requires": { "clean-css": "4.x.x", "uglify-es": "3.x.x" + }, + "dependencies": { + "clean-css": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", + "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", + "requires": { + "source-map": "~0.6.0" + } + } } }, - "minimatch": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz", - "integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==", - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==" - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -1484,22 +1198,6 @@ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, - "path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "requires": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "dependencies": { - "minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==" - } - } - }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -1660,11 +1358,6 @@ } } }, - "uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==" - }, "undici": { "version": "5.28.4", "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", diff --git a/package.json b/package.json index a1003e7..299ccca 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,7 @@ "author": "Violet ", "license": "MIT", "dependencies": { - "@node-minify/core": "^8.0.6", - "@node-minify/uglify-js": "^8.0.6", "express": "^4.18.2", - "himalaya": "^1.1.0", "minify-html": "^0.0.2", "ws": "^8.16.0", "youtubei.js": "^9.0.2" diff --git a/pageUpdater.js b/pageUpdater.js index 2955028..49a582c 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -1,12 +1,10 @@ const path = require('path'), fs = require('fs'), WebSocket = require('ws'), - minify = require('@node-minify/core'), - uglifyJs = require("@node-minify/uglify-js"), - htmlMinifier = require("minify-html"), - activityToHTML = require("./overcomplicatedStatuses.js"), - randomThemer = require("./randomThemer.js"), - himalaya = require("himalaya") + minify = require('minify-html'), + activityToHTML = require("./overcomplicatedStatuses.js") + + // weatherGenerator = require("./weatherGenerator") var constants = JSON.parse(fs.readFileSync(path.join(__dirname, 'constants.json'))) @@ -21,11 +19,16 @@ var commitCount = "500+" var lanyardData = undefined var uptime = Date.now() +var reloads = 0 function firstToUpper(str) { return str.charAt(0).toUpperCase() + str.slice(1) } +var thumborURL = "https://thumbor.violets-purgatory.dev/unsafe/" +var imgExtension = "png" +var thumborArgs = `filters:format(${imgExtension})/` + function timeFormatter(seconds) { seconds = Math.ceil(seconds) var minutes = Math.ceil(seconds / 60) @@ -40,21 +43,31 @@ function timeFormatter(seconds) { } -function converter(html) { +function converter(html, query) { var startTime = Date.now() - - html = html - + var config = JSON.parse(fs.readFileSync(path.join(__dirname, 'config/config.json'))) + reloads += 1 + while (html.includes("{PATH_")) { + var pagePath = html.substring(html.indexOf("{PATH_")) + pagePath = pagePath.substring(6, pagePath.indexOf('}')) + + var stringIndex = `{PATH_${pagePath}}` + pagePath = pagePath.toLowerCase() + + var pageHTML = fs.readFileSync(path.join(__dirname, 'static', pagePath, 'index.html')).toString() + pageHTML = pageHTML.substring(pageHTML.indexOf('
') + 6, pageHTML.indexOf('
')) + html = html.replace(stringIndex, pageHTML) + } var statusText = "" - + if (lanyardData) { var statusData = constants.discStatuses[lanyardData.discord_status] var username = lanyardData.discord_user.username if (lanyardData.activities[0] && lanyardData.activities[0].type == 4) { - var statusText = `

${lanyardData.activities[0].state}

` + var statusText = `

${lanyardData.activities[0].state}

` } } else { var statusData = constants.discStatuses.offline @@ -78,92 +91,54 @@ function converter(html) { "COMMIT_COUNT": commitCount, "QUOTE_COUNT": quotes.length, "RANDOM_TITLE": titles[Math.floor(Math.random() * titles.length)], - "DISCORD_STATUS": - `${statusData.text}` + - ``, + "DISCORD_STATUS": + `${statusData.text}` + + ``, "UPTIME": uptime, "TOPBAR": `

Socials

`, "DISCORD_USER": username, "CUSTOM_STATUS": statusText, "SELECTED_VIDEO": () => { if (config.dailyVideoURL) { - return `


Random video!

I would call it random daily video but its not at all daily...

-
- ` + return `


Random video!

I would call it random daily video but its not at all daily...

+
+ ` } return `` }, "SPINCOUNT": globalSpins, "UPTIME": timeFormatter((Date.now() - uptime) / 1000), - "WEATHER_MODIFIER": randomThemer.returnTheme(), + "RELOAD_COUNT": reloads, + "WEATHER_MODIFIER": "", "WEATHER_TEXT": "", "ANNOUNCEMENT": fs.readFileSync(path.join(__dirname, "config/announcement.html")), - "CACHED_IMAGES": fs.readdirSync(path.join(__dirname, "cached")).length.toString(), - "ACTIVITIES": activityToHTML.activitiesToHTML(lanyardData) + "CACHED_IMAGES": fs.readdirSync(path.join(__dirname, "cached")).length.toString() } - + replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} " - while (html.includes("{PATH_")) { - var pagePath = html.substring(html.indexOf("{PATH_")) - pagePath = pagePath.substring(6, pagePath.indexOf('}')) - - var stringIndex = `{PATH_${pagePath}}` - pagePath = pagePath.toLowerCase() - - var pageHTML = fs.readFileSync(path.join(__dirname, 'static', pagePath, 'index.html')).toString() - pageHTML = pageHTML.substring(pageHTML.indexOf('
') + 6, pageHTML.indexOf('
')) - html = html.replaceAll(stringIndex, pageHTML) - } - var rpTable = Object.keys(replacers) for (let index = 0; index < rpTable.length; index++) { const text = rpTable[index]; html = html.replaceAll(`{${text}}`, replacers[text]) } - - if (html.includes("")) { - var bodyHTML = htmlMinifier.minify(html.substring(html.indexOf("") + 6, html.lastIndexOf(""))) - var parsedHTML = himalaya.parse(bodyHTML) - } else { - var parsedHTML = himalaya.parse(html) + + var bodyHTML = html.substring(html.indexOf("") + 6, html.lastIndexOf("")) + var highTable = Object.keys(highlightedWords) + + for (let index = 0; index < highTable.length; index++) { + var term = highTable[index]; + var replacement = `${term}` + + bodyHTML = bodyHTML.replaceAll(`{${term}}`, "TEMPORARY_REPLACE") + bodyHTML = bodyHTML.replaceAll(term, replacement) + bodyHTML = bodyHTML.replaceAll("TEMPORARY_REPLACE", `${term}`) } - function highlighter(json) { - for (var i = 0; i < json.length; i++) { - var element = json[i] - if (element.type == "element") { - if (element.children.length > 0) { - element.children = highlighter(element.children) - } - } else if (element.type == "text") { - var highTable = Object.keys(highlightedWords) + bodyHTML = bodyHTML.replaceAll("{ACTIVITIES}", activityToHTML.activitiesToHTML(lanyardData, cachedImages)) - for (let index = 0; index < highTable.length; index++) { - var term = highTable[index]; - var replacement = `${term}` - - - element.content = element.content.replaceAll(`{${term}}`, "TEMPORARY_REPLACE") - element.content = element.content.replaceAll(term, replacement) - element.content = element.content.replaceAll("TEMPORARY_REPLACE", `${term}`) - } - } - } - - return json - } - - parsedHTML = highlighter(parsedHTML) - - parsedHTML = himalaya.stringify(parsedHTML) - - if (html.includes("")) { - html = html.substring(0, html.indexOf("")) + parsedHTML + html.substring(html.indexOf("") + 7) - } else { - html = parsedHTML - } + html = html.substring(0, html.indexOf("")) + bodyHTML + html.substring(html.indexOf("") + 7) html = html.replaceAll("{LOAD_TIME}", (Date.now() - startTime).toString() + "ms") @@ -172,10 +147,10 @@ function converter(html) { module.exports = { getActivities: function () { - return htmlMinifier.minify(converter(activityToHTML.activitiesToHTML(lanyardData))) + return minify.minify(activityToHTML.activitiesToHTML(lanyardData, cachedImages)) }, - middleWare: async function (req, res, next) { + middleWare: function (req, res, next) { var filePath = (req.baseUrl + req.path).trim() @@ -190,21 +165,21 @@ module.exports = { filePath = path.join(__dirname, 'static', filePath || 'index.html') if (fs.existsSync(filePath)) { var data = fs.readFileSync(filePath).toString() - + res.contentType(path.basename(filePath)) + // if (req.path.includes(".css")) { + // res.setHeader("Content-Type", "text/css") + // } else if (!req.path.includes(".woff2")) { + // data = converter(data, req.query) + // } + if (filePath.includes(".html")) { data = converter(data, req.query) - } if (!filePath.includes(".js")) { - data = htmlMinifier.minify(data) - } else { - data = await minify({ - compressor: uglifyJs, - content: data - }) + data = minify.minify(data) } res.send(data) @@ -224,7 +199,7 @@ async function updateCommits() { commits = commits.substring(commits.lastIndexOf("") + 3, commits.lastIndexOf("")) // ^ this works for Forgejo (basically everything i use that isnt Github E.G. Codeberg) - + // commits = commits.substring(commits.lastIndexOf(">") + 1) // ^ This works for Github (fuck you Github) @@ -241,10 +216,37 @@ updateCommits() var lastLanyardUpdate = Date.now() var lastPong = 0 +var activityImages = constants.activityImages +var cachedImages = {} + +function get_img_url(activity, size = "large_image") { + if ("assets" in activity) { + var image = activity.assets[size] + + if (image) { + if (image.includes("https/")) { + return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length)) + } else if (image.includes("spotify")) { + return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)) + } else { + return decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png") + } + } + } + + if (!image && size == "large_image") { + if (activity.name in activityImages) { + return decodeURIComponent(activityImages[activity.name]) + } + } + return null +} + + function socketeer() { var lanyard = new WebSocket('https://api.violets-purgatory.dev') - lanyard.on("error", (error) => { + lanyard.on("error", (error) =>{ console.log(error) }) @@ -280,6 +282,38 @@ function socketeer() { } else if (data.op == 0) { lanyardData = data.d lastLanyardUpdate = Date.now() + + for (let index = 0; index < lanyardData.activities.length; index++) { + const activity = lanyardData.activities[index]; + + if (get_img_url(activity)) { + var url = get_img_url(activity) + var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension + var fp = path.join(__dirname, 'cached', fn) + + if (!cachedImages[url]) { + const response = await (await fetch(thumborURL + "200x200/" + thumborArgs + url)).arrayBuffer() + fs.writeFileSync(fp, Buffer.from(response)) + + cachedImages[url] = fn + } + } + + if (get_img_url(activity, "small_image")) { + var url = get_img_url(activity, "small_image") + var fn = Math.ceil(Math.random() * 100_000_000_000).toString() + "." + imgExtension + var fp = path.join(__dirname, 'cached', fn) + + if (!cachedImages[url]) { + const response = await (await fetch(thumborURL + "64x64/" + thumborArgs + url)).arrayBuffer() + + fs.writeFileSync(fp, Buffer.from(response)) + + cachedImages[url] = fn + } + } + } + } else if (data.op == 4) { globalSpins = data.spins } diff --git a/randomThemer.js b/randomThemer.js deleted file mode 100644 index 2f3e0b4..0000000 --- a/randomThemer.js +++ /dev/null @@ -1,75 +0,0 @@ -function rain() { - var html = "" - - html += `
` - html += `` - - var amount = 7 - - for (let index = 0; index < amount; index++) { - html += `
` - } - html += "" - html += "
" - - return html -} - -function night() { - -} - -var events = [ - rain(), - "", -] - -module.exports = { - - returnTheme: function() { - var time = new Date() - return events[time.getUTCDay() % events.length] - }, - -} \ No newline at end of file diff --git a/static/noScript.css b/static/noScript.css index 0626463..63de797 100644 --- a/static/noScript.css +++ b/static/noScript.css @@ -6,8 +6,4 @@ .noscript { display: initial; -} - -.scriptEnabled { - display: none; } \ No newline at end of file diff --git a/static/root.css b/static/root.css index 91b31a5..8b72731 100644 --- a/static/root.css +++ b/static/root.css @@ -71,6 +71,22 @@ img:not(.project-inner > div > img):not(.activity>img) { transition: all 2s cubic-bezier(0.075, 0.82, 0.165, 1); } +@media screen and (min-width: 850px) { + .activity-container { + display: flex; + flex-wrap: wrap; + justify-content: center; + } + + .activity { + flex: 0 0 49%; + margin: auto; + padding: 0; + margin: 0; + align-content: center; + } +} + @keyframes spinny { 0% { rotate: 0deg; diff --git a/static/socials/index.html b/static/socials/index.html index e8249b0..33d6575 100644 --- a/static/socials/index.html +++ b/static/socials/index.html @@ -51,7 +51,7 @@

Coding

Forgejo: bingus_violet (git.violets-purgatory.dev) - {Code}berg: bingus_violet + Codeberg: bingus_violet Docker: bingusviolet Github: violets-puragtory
diff --git a/static/stats/index.html b/static/stats/index.html index 6ae3c2a..310a47b 100644 --- a/static/stats/index.html +++ b/static/stats/index.html @@ -37,7 +37,13 @@ +


+
    +
  1. Increments by 1 EVERY time ANY page is loaded.
  2. +
  3. Cached Images are cleared on server restart.
  4. diff --git a/static/style.css b/static/style.css index b56c785..cf8bc82 100644 --- a/static/style.css +++ b/static/style.css @@ -9,14 +9,6 @@ color-scheme: dark; } -@font-face { - font-display: swap; - font-family: 'RubikBold'; - font-style: bold; - font-weight: 600; - src: url('./fonts/rubik-v28-latin-600.woff2') format('woff2'); -} - @font-face { font-display: swap; font-family: 'Rubik'; @@ -176,26 +168,6 @@ h2 { text-decoration-color: white; } -br { - display: block; - margin: 3px 0; -} - -@media screen and (min-width: 850px) { - .activity-container { - display: flex; - flex-wrap: wrap; - justify-content: center; - } - - .activity { - flex: 0 0 49%; - margin: auto; - padding: 0; - margin: 0; - align-content: center; - } -} .activity { @@ -207,7 +179,6 @@ br { display: flex; position: relative; z-index: 3; - max-width: 650px; /* max-height: 200px; */ } @@ -326,12 +297,4 @@ sup { em, b, s { color: inherit; -} - -b, b > *, .activityTitle, .activityTitle > * { - font-family: "RubikBold", Verdana, Geneva, Tahoma, sans-serif; -} - -.activityTitle { - text-decoration: underline; } \ No newline at end of file diff --git a/static/themes/rain.css b/static/themes/rain.css deleted file mode 100644 index 19fe490..0000000 --- a/static/themes/rain.css +++ /dev/null @@ -1,33 +0,0 @@ - -#card { - background-color: rgba(50, 0, 90, 0.5); - backdrop-filter: blur(5px); -} -.rainStuff { - position: sticky; - top: 0; - height: 0; - z-index: -5; -} - -.rainContainer { - height: 100vh; - width: 80vw; - top: 0px; - left: 10vw; - position: absolute; - overflow: hidden; -} - -.rainDrop { - position: absolute; - width: 5px; - backdrop-filter: blur(5px); - background-color: rgba(0, 0, 255, 0.2); - height: 10vh; - visibility: hidden; -} - -body { - background: linear-gradient(rgb(10, 10, 75), black); -} \ No newline at end of file