Find a file
2024-11-24 21:54:34 -06:00
assets Blog title & description 2024-07-09 17:53:14 -05:00
static Fix m ain page metadata 2024-11-23 01:45:58 -06:00
.gitignore Emojis! 2024-06-08 18:31:34 -05:00
api.js Lanyard should be undefined, socials will be seperated in another update 2024-11-17 10:27:19 -06:00
blog.js Blog title & description 2024-07-09 17:53:14 -05:00
constants.json Highlighter changes: Remove brain, add .scss, change .scss color to be more vibrant, add git, make git & Github brighter, add .ts 2024-11-22 17:18:31 -06:00
expressHandler.js Express handler is split from index.js 2024-06-30 02:14:50 -05:00
fileHandler.js Split filehandler from index.js 2024-06-30 02:18:54 -05:00
index.js Blog in development 2024-07-07 23:33:16 -05:00
LICENSE asd 2023-09-21 21:18:23 +00:00
overcomplicatedStatuses.js More right padding, less code 2024-11-22 17:09:58 -06:00
package-lock.json new CSS minifier 2024-09-30 21:34:39 -05:00
package.json new CSS minifier 2024-09-30 21:34:39 -05:00
pageUpdater.js Fix nitro emojis 2024-11-24 21:54:34 -06:00
randomThemer.js Halloween theme done, I guess 2024-09-30 18:23:48 -05:00
README.md Test commit again 2024-08-08 19:08:39 -05:00

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

We also have an API, which can be located at https://api.violets-purgatory.dev, which is currently under developed, but will continue to have updates for features I see fit.

How it works

The Constants file

Although the code for it isn't nessacarily pretty, theres a few important things to go over with how it works. constants.json contains constants for Violet's Purgatory. In the file, there are lots of important notable features, such as a fallback lanyard 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 can make them not case sensitive by specifying caseInsensitive: true in the json file. 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.

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 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. This process is split into 2 steps, the static part and the dynamic part. The static part is ran whenever my lanyard updates (excluding activities), while the dynamic part is ran on page load. These 2 processes are known as "pregeneration" and "page generation" respectively.

There is also a {PATH_[html file]} keyword. 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. Afterwards, look at the socials page. 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.