# My original obsession over server efficiency came from when I was working on my Pokemon Hentai game and the free shared hosting I used at the time kept getting overloaded from all the downloads of the game. The host complained about "CPU Overuse"
# But over time my website changed priority toward being archive-friendly for the Internet Wayback Machine, so I started storing the data in the HTML itself instead of a tiny JSON file.
# What if I had the same thumbnail gallery, but they expand when you click on them? Just stretch an invisible checkbox over the entire thumbnail when it's unchecked, and make the checkbox full-screen when it's checked. Then sort it behind the content for click-away cancelling.
# How would I even do that? Maybe I could use an SVG image with a hole in it as the background? Nope that doesn't work. The browser treats the entire thing as a square image.
# Apparently clip-path can do it.
# Now I just need to overlay a close icon over the hole and make clicks pass through it by using a CSS property "pointer-events" set to "none"
# Controlling the size of this hole is tricky because it's based on vw vh units which are just a percentage of the viewport. I can't just say 100% -12pt because CSS doesn't let you mix units.
# ... Unless I use calc() then I CAN mix units! But why does it sometimes look like a rectangle instead of a square?
# The scrollbar is covering it up! I'll just uh, subtract 16px and always have scrollbars visible.
# The nice thing about using calc() is that this "close button" is large on vertical displays (like phones) and small on wide displays (everything larger than phones) This happens based on portrait or landscape view because I am dividing the width and height against each other in the CSS calc() function.
# I can just make the content hidden while the checkbox is OFF and visible when it's ON and use loading='lazy' to prevent the browser from loading EVERY SINGLE video and full-size image until they're actually visible.
# If I scale the content to ScreenHeight - ThumbHeight then you won't need to scroll to see it.
# ... Unless the screen is very small. Wait, why isn't scrolling working??
# Apparently setting bottom to 0 fixes that. But you can't actually see the scrollbar?
# Wait a minute. If it's always fullscreen, then I no longer need to put the checkbox behind everything, so I could just move the checkbox itself to the top right and directly use it as a close button now. No holes needed.
# But there's a problem with things being full-screen. It'll look like a new page and on a phone you'll want to press the phone's 'back" button to exit the expanded view. But that will actually LEAVE the entire website!
# Maybe the least confusing solution is to just use separate web pages. Just like in 1998. I guess using fancy CSS for this is a bad idea after all.
# I already use separate pages for the 'more info' part of my projects. The only problem with putting all the info in these pages is that you have duplicate info between the gallery and the individual pages, which makes it hard to update.
# I COULD leave out the title, thumbnail, and content labels in the separate pages and only display those in the thumbnails, but if someone finds one of the 'info' pages through google they won't know the title.
# ... or how to get back to the gallery, since the navigation would be missing, so I'd need to at least duplicate that part. This is a very old problem with a very old solution. Templates. That's why PHP was invented.
# Before templates existed, framesets tried to fix the duplicate information problem, but navigation still goes missing if you reach a page directly from Google. They also suck on mobile phones. Don't use them.
# I've been trying to avoid relying on any server-side stuff since that whole side of things is hidden from Wayback Machine archiving, but duplicating info and navigation would probably be okay.
# I've never used PHP. I heard it's terribly designed. But I also know it's been around for decades and was originally created for templating. It's probably pretty decent for its originally intended use. Just load 2 HTML files and display them both.
# And no, I still won't use a database. My static website doesn't need SQL injection vulerabilities, thank you.