overhauled old theme

This commit is contained in:
sundae 2025-10-14 19:40:29 +03:00
parent f18a342ae5
commit fb24c6a302
No known key found for this signature in database
82 changed files with 1378 additions and 1371 deletions

View file

@ -5,20 +5,26 @@ modified: 2025-05-23
blurb: <p>Invalid DateTime. ha, got you.</p>
avatar: /assets/img/art/sundae_glistening.png
---
## {{page.fileSlug}}
<time datetime="{{date|ISO}}">{{date|readable}}</time>
<section aria-label="Post warning">WARNING: BORING NERD TOPIC AHOY</section>
<section aria-label="Post warning">
WARNING: BORING NERD TOPIC AHOY
</section>
I had mentioned on my Neocities profile that I would look into re-writing my website fairly soon right after pushing an update out. Took a bit longer than I would've liked honestly, but it's here!
Actually, it had been mostly finished for a while (since July 1st), but I hit a couple of roadblocks (mainly date conversion) that demoralized me from working more on it at the time, as well as some lifestyle changes, like spending less time on the PC and exercising often.
**The most notable things about my site re-write off the top of my head are:**
* converting page elements into `.json` data tables
* rebasing large parts of the page styling
* a larger emphasis on accessibility
- converting page elements into `.json` data tables
- rebasing large parts of the page styling
- a larger emphasis on accessibility
### I have <s>no</s> some idea what I'm doing
@ -30,7 +36,6 @@ I was **very eager** to start working on it, and because I decided to do so late
### You're telling me that Java scripted this?
I still don't understand JavaScript that well, got stumped on a couple of things, and as a result I took some time off working on the re-write.
Regardless, I had ported over the base layout and most pages, which would be around 90% of the work done within the first couple of days. The last 10% that was left being: having to tackle date conversion with [Luxon](https://github.com/moment/luxon), setting custom filters for Eleventy to use them and forgetting to port a few page elements to `.json` data tables.
@ -38,19 +43,24 @@ Regardless, I had ported over the base layout and most pages, which would be aro
Currently, my filters are handled really shittily, but they work whenever I build my site.
Here's how I currently have my filters set up for dates in my `.eleventy.js` file, if you also happen to struggle with this:
```js
const { DateTime } = require("luxon");
module.exports = function(eleventyConfig) {
eleventyConfig.addFilter("postDate", (dateObj) => {
return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat('yyyy-MM-dd');
});
eleventyConfig.addFilter("galleryDate", (dateObj) => {
return DateTime.fromISO(dateObj, { zone: 'utc' }).toLocaleString(DateTime.DATE_FULL);
});
eleventyConfig.addFilter("readableDate", (dateObj) => {
return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toLocaleString(DateTime.DATE_FULL);
});
module.exports = function (eleventyConfig) {
eleventyConfig.addFilter("postDate", (dateObj) => {
return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat("yyyy-MM-dd");
});
eleventyConfig.addFilter("galleryDate", (dateObj) => {
return DateTime.fromISO(dateObj, { zone: "utc" }).toLocaleString(
DateTime.DATE_FULL
);
});
eleventyConfig.addFilter("readableDate", (dateObj) => {
return DateTime.fromJSDate(dateObj, { zone: "utc" }).toLocaleString(
DateTime.DATE_FULL
);
});
};
```
@ -62,4 +72,4 @@ Before you ask: No, I couldn't condense it into two filters, I tried. I'm far to
Despite my struggles, I think Eleventy is a great piece of software, it's just that I'm not knowledgeable enough to leverage its strengths to the fullest.
The fault point here is not even Eleventy itself, but just a popular JavaScript library for dealing with time.
The fault point here is not even Eleventy itself, but just a popular JavaScript library for dealing with time.