From e1de101cc7d9dd3433bd84f5f8f4b4b48064baa2 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Wed, 26 Jun 2024 19:18:44 -0500 Subject: [PATCH] Subpage 2.0! --- pageUpdater.js | 7 ++++- static/asahi/index.html | 1 + static/faq/index.html | 9 ++++-- static/index.html | 4 +-- static/main.js | 2 -- static/socials/index.html | 31 ++++++++++--------- static/stats/index.html | 65 ++++++++++++++++++++++++--------------- static/style.css | 11 ++++--- static/subpage.css | 17 ++-------- 9 files changed, 81 insertions(+), 66 deletions(-) diff --git a/pageUpdater.js b/pageUpdater.js index ab333e5..f06ae58 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -195,7 +195,12 @@ function converter(html, dynamic = true) { return ""; }, - "TOPBAR": `

Socials

`, + "TOPBAR": `
+

Home + Socials + Stats + Nerd FAQ

+
`, "CUSTOM_STATUS": () => { if (api.lanyard.activities[0] && api.lanyard.activities[0].type == 4) { var status = api.lanyard.activities[0] diff --git a/static/asahi/index.html b/static/asahi/index.html index bbba3ac..69debc8 100644 --- a/static/asahi/index.html +++ b/static/asahi/index.html @@ -25,6 +25,7 @@ {WEATHER_MODIFIER} + {TOPBAR}

Welcome to myHumble Abode

diff --git a/static/faq/index.html b/static/faq/index.html index 24a83b1..c01e7ba 100644 --- a/static/faq/index.html +++ b/static/faq/index.html @@ -24,9 +24,7 @@ {WEATHER_MODIFIER} - Home - Socials - Stats + {TOPBAR}

FAQ (and more!)


1. Questions & Answers

@@ -34,6 +32,7 @@

Why are so many words colored?

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 Automatic Word Highlighting System! 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:

{ALL_HIGHLIGHTS}

+

As time continues, more words are added to the highlighting list, and I'm slowly adding more features, like disabling case sensitivity, boldness, italics, outlines, and more.


I thought the site doesn't use Javascript? So why is it there?

Originally, all my sites were completely Javascript free. As of late, though, I decided to add Javascript to this one. Javascript will NEVER be a requirement on this site. Javascript will ONLY be used where necessary, and I will do everything possible to make the experience indistinguishable.

@@ -48,6 +47,10 @@

Slowly, though, they're slowly all merging into one CSS file, so I can't be sure it'll stay this way for long.

As for the "unused" style.css, though, that exists for compatibility reasons- many of my older sites just grabbed CSS from the site for their css. This has been mostly fixed, but the FileShare still does, so it'll stay until I finally give the FileShare its own CSS.

+

Why/How are certain segments of pages "embedded" on others?

+

On the main page, you may notice certain other pages contained inside it, such as this page, the stats page, and socials page. And, most notably with this page, it's not the full page, either.
+ This is because of a feature I created called "page embeds", which allow me to embed a portion of content from another page, without the use of any sort of iframes. This was made so I could keep information on multiple pages up to date.
+ It's much more performant and scalable than an I-frame as well.

diff --git a/static/index.html b/static/index.html index 06828af..761a63e 100644 --- a/static/index.html +++ b/static/index.html @@ -55,10 +55,10 @@

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.

diff --git a/static/main.js b/static/main.js index 37e8997..9b1708f 100644 --- a/static/main.js +++ b/static/main.js @@ -108,8 +108,6 @@ window.onbeforeunload = function () { } window.onload = function () { - window.scrollTo(0, 0); - $("#jsEnabled").text("true") pfp = $(".pfp") diff --git a/static/socials/index.html b/static/socials/index.html index b598d22..9841c03 100644 --- a/static/socials/index.html +++ b/static/socials/index.html @@ -4,7 +4,7 @@ - + @@ -24,17 +24,18 @@ {WEATHER_MODIFIER} - Home + {TOPBAR} +

Socials


-
-

Here's most of the sites you can find me on-
if you needed that for some reason?

-
- {SOCIALS} - +
+
+
+
+ {ACTIVITIES}
-
-
-
- {ACTIVITIES} -
- {SELECTED_VIDEO} - + {SELECTED_VIDEO} + \ No newline at end of file diff --git a/static/stats/index.html b/static/stats/index.html index a83c54e..a69c369 100644 --- a/static/stats/index.html +++ b/static/stats/index.html @@ -4,7 +4,7 @@ - + @@ -16,38 +16,55 @@ - + {WEATHER_MODIFIER} - Home - Socials - FAQ -

Stats

-

This is the full stats page! This page exists for testing the speed of site generation, and contains every keyword on Violet's Purgatory in a hidden div.

- -
- {ALL_KEYWORDS} {ALL_KEYWORDS} {ALL_KEYWORDS} {ALL_KEYWORDS} {ALL_KEYWORDS} -
-
-


Stats

-
+ {TOPBAR} +

Stats

+
+

Welcome to the stats page! This page is now "deprecated"... sorta.
+ Feel free to read more about it at the bottom of the page.

+
+

+
Stats +

+
+
    +
  • Page generation time: {LOAD_TIME}
  • +
  • Pregeneration time: {PREGEN_TIME}ms
  • +
  • Uptime: {UPTIME}
  • +
  • Last Lanyard update: {LAST_LANYARD}
  • +
  • Last Pregeneration: {LAST_PREGEN}
  • +
  • Server connected to API: {API_CONNECTED}
  • +
  • Javascript Loaded/Enabled: false
  • +
  • Client connected to API: false
  • +
+
+


Why does this page exist?

+

Originally, the stats page served the purpose of putting heavy load on the server for testing page generation times. This had a number of problems, though:

+
    +
  1. Anyone could freely use this page and put the server under heavy load, with no limits, including malicious actors.
  2. +
  3. The page itself failed to serve its original function, as it was not an accurate display of what kind of loads or processing would be caused by a real page on the site, as it did not contain things such as page embeds, and otherwise had a lack of content.
  4. +
  5. It didn't provide any information the main page did not.
  6. +
+

The list could probably go on and on, but by now I suspect you begin to get the idea. So, overall, this page is pretty useless :3

+


Why does it still exist then?

+

Mainly for the aforementioned page embeds. The main page, and others, can embed the stats page on themselves to easily collect statistics! Currently, this is only used on the main page but, the code is still more organized and much more modular than if I had smacked the code into the main page and called it a day.

+


The future of the stats page

+

I have a few different ideas at the moment, one of them being an actual stats monitor. E.G, I could record stats such as:

    -
  • Page generation time: {LOAD_TIME}
  • -
  • Pregeneration time: {PREGEN_TIME}ms
  • -
  • Uptime: {UPTIME}
  • -
  • Last Lanyard update: {LAST_LANYARD}
  • -
  • Last Pregeneration: {LAST_PREGEN}
  • -
  • Server connected to API: {API_CONNECTED}
  • -
  • Javascript Loaded/Enabled: false
  • -
  • Client connected to API: false
  • +
  • Programs connected to the api (This would includes sites AND users)
  • +
  • Average CPU, RAM, etc loads
  • +
  • Uptime monitor (Would probably pull from something like Uptime Kuma)
-
- +

But, only time can tell :)

+ \ No newline at end of file diff --git a/static/style.css b/static/style.css index 16b6669..8d4ee28 100644 --- a/static/style.css +++ b/static/style.css @@ -35,14 +35,15 @@ } #topbar { - background-color: rgb(75, 50, 125); + background-color: rgb(75, 50, 125, 0.5); width: 100%; padding: 1vh 0px; - position: sticky; + margin-bottom: 1vh; + /* position: sticky; */ left: 0px; top: 0px; z-index: 10; - opacity: 0.5; + /* opacity: 0.5; */ transform: scale(1); transition: all 2s cubic-bezier(0.075, 0.82, 0.165, 1); } @@ -250,11 +251,13 @@ br { } ul, ol { - display: inline-block + display: inline-block; + max-width: 90%; } li { font-size: 1.2rem; + padding: 5px 0; text-align: left; } diff --git a/static/subpage.css b/static/subpage.css index 66ac077..cd84030 100644 --- a/static/subpage.css +++ b/static/subpage.css @@ -9,23 +9,10 @@ h1:nth-of-type(1) { } -body { +/* body { padding: 5vh 0; -} +} */ .mainDiv { - animation: fadeUp 1s cubic-bezier(0.075, 0.82, 0.165, 1); margin: auto; -} - -@keyframes fadeUp { - 0% { - transform: translateY(50vw); - opacity: 0; - } - - 100% { - transform: none; - opacity: 1; - } } \ No newline at end of file