From 7aa9ba6311bf399202080d6d474bdce89428145f Mon Sep 17 00:00:00 2001 From: Violet Date: Tue, 16 Apr 2024 19:25:15 +0000 Subject: [PATCH] Socials page finally gets acknowledged --- README.md | 38 +++++++++++++++++++++++--------------- config.json | 3 ++- static/index.html | 6 +++++- static/socials/index.html | 7 ++++++- static/subpage.css | 1 + 5 files changed, 37 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9cadf39..0fbe139 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,31 @@ # Violets-Purgatory Violet's Purgatory is a website filled to the brim with whatever I feel like adding! Currently, the stable version can be found at https://violets-purgatory.dev and the beta (based on the dev branch) can be found at https://beta.violets-purgatory.dev -Although beta probably *isn't* the right term, `dev.violets-purgatory.dev` is just kinda ugly :/ We also have an API, which can be located at https://api.violets-purgatory.dev, which is currently very under developed, but will continue to have updates for features I see fit. -## To-do -- [ ] Add more content to the socials page +# How it works + +### The config +Although the code for it isn't nessacarily pretty, theres a few important things to go over with how it works. +The config.json file, soon to be renamed for a local config, contains constants for Violet's Purgatory. In the file, there are lots of important notable features, such as fallback activity images for the Discord Activity section, and words that are automatically highlighted. + +### Word highlighting +Word highlighting is a feature that automatically sets the color of certain keywords, including but not limited to Violet being purple, Javascript being yellow, NodeJS being green, and Godot Engine being blue. This is nothing more than a fancy feature to reduce the amount of code required on the site. +These highlighted words ARE case senstive. You may notice certain things such as "Violet" at the top of the card are not highlighted despite being in the words list. To make a word in the highlight list not highlighted, simply add `{}` around it. E.G. for the title of the page, on the site it shows as `Violet`, but in the code is written as `{Violet}` to prevent highlighting. + +To add new highlighted words, find the highlighted words section in config.json. The key is the word to highlight, and the value is the color. + +### Dynamic HTML +Currently this system is extremely unsophisticated, adding new dynamic HTML isn't as streamlined as it should be. Basically, in the code, is a dictionary that specifies every keyword to look for. Then, it looks for those keywords, and replaces them with HTML. +A good example is the activity system. The keyword for the discord activities is `ACTIVITIES`. So, if you wanted to create another activity section, you would simply put `{ACTIVITIES}` in the HTML code. + +There is also a `{PATH_[html file]}` keyword. Currently, this is not used much, but may be more useful in the future. +On the main page, you can find `{PATH_SOCIALS}`. This effectively "embeds" the socials page on the site. The part of the page that is used is based upon the `main` HTML tag. +For an easy to digest example, look at the socials section on the main page of [Violet's Purgatory](https://violets-purgatory.dev). Afterwards, look at the [*socials page*](https://violets-purgatory.dev/socials). You will notice they're the same, because in the code for the main page, I put {PATH_SOCIALS} which got the page at /socials. + +# To-do +- [ ] Add more content to the socials page & make it more easily findable on the site - [ ] Pull latest Youtube video & display it - [ ] Display current Discord Activities - - [ ] Display current steam game - -Completed: - - -- [x] Stop using Lanyard Web Socket Directly and proxy it through the API (Alternatively, self host the Lanyard API) -- [x] Cut the main CSS file into multiple so that only the nessacary CSS is loaded (Reduces traffic and loading times) -- [x] Add image caching instead of using image proxies (keeps the security benefit and decreases loading times) -- [x] Add code to automatically minify the HTML -- [x] Add random quotes -- [x] Seperate Values from the javascript into their own config for readability -- [x] Add a commit counter \ No newline at end of file + - [ ] Display current steam game \ No newline at end of file diff --git a/config.json b/config.json index 8cf7450..6c21a90 100644 --- a/config.json +++ b/config.json @@ -38,7 +38,8 @@ "no idea how branches work", "Their ass is NOT listening", "These birds are Pissing me off... I'm the original        Starwalker", - "Married to my beloved Asahi <3" + "Married to my beloved Asahi <3", + "Fun fact: Did you know the Socials section is considered its own page?" ], "titles": [ "Boykisser", diff --git a/static/index.html b/static/index.html index 47c2824..ef71aff 100644 --- a/static/index.html +++ b/static/index.html @@ -45,9 +45,12 @@

Hi! I'm Violet, a 15 year old web and game developer. I aspire to make server-sided dynamic websites, with no Javascript required! I'm currently making games in the Godot Engine, and my dynamic sites in NodeJS.

+ Socials + Nerd FAQ +
Beta site Blog - + FileShare
{CUSTOM_STATUS} @@ -68,6 +71,7 @@

Socials

{PATH_SOCIALS} +

Please note I am extremely unhinged and gay on Fedi, I don't use Github, and I barely understand Docker.


{WEATHER_TEXT}


diff --git a/static/socials/index.html b/static/socials/index.html index 1b64494..009bce6 100644 --- a/static/socials/index.html +++ b/static/socials/index.html @@ -4,6 +4,7 @@ + @@ -19,7 +20,9 @@ + {WEATHER_MODIFIER}

Socials

+

Congrats on finding the Incomplete seperated version of the socials page!!!!

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

@@ -55,8 +58,10 @@

-

Please note I am extremely unhinged and gay on Fedi, I don't use Github, and I barely understand Docker.

+
+ {ACTIVITIES} +
\ No newline at end of file diff --git a/static/subpage.css b/static/subpage.css index 9bfb586..6b13fe2 100644 --- a/static/subpage.css +++ b/static/subpage.css @@ -6,6 +6,7 @@ h1:nth-of-type(1) { font-size: 2.5rem; + } body {