Find a file
2024-04-25 20:01:42 -05:00
assets How long has minification been broken? 2024-04-20 06:50:20 -05:00
resources Now closes on page close 2024-03-08 10:55:02 -06:00
static Move Lengthbars to global 2024-04-25 20:01:42 -05:00
.gitignore MORE ORGANIZE!!! 2024-04-18 21:39:08 -05:00
config.json Add CSS to highlighted words 2024-04-22 10:17:35 -05:00
index.js Remove websocket code, show global spin count for users without JS, and new noscript class 2024-04-21 13:01:21 -05:00
LICENSE asd 2023-09-21 21:18:23 +00:00
overcomplicatedStatuses.js MORE ORGANIZE!!! 2024-04-18 21:39:08 -05:00
package-lock.json Fix empty weather text 2024-04-24 15:41:03 -05:00
package.json Testing 2024-04-20 12:56:37 -05:00
pageUpdater.js PNGs 2024-04-25 20:01:02 -05:00
README.md update Todo 2024-04-24 15:43:38 -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 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. 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.

To-do

Highlighter:

  • Desperately need to rework the highlighting system.
    • Make it ignore classes, IDs, inline-CSS attributes, etc
    • Only index visible elements for words
    • Ignore text ouside the body

Socials:

  • Make it more easily findable on the site
  • Add more content
    • Pull latest Youtube video & display it
    • Display current Discord Activities

Activities

  • Compress images to reduce space used and network usage (Probably using thumbor to prevent needing MORE packages TwT)