Hacker News new | ask | show | jobs
by ramesh31 977 days ago
>"For each of these design problems, I eventually found a fee-free solution:"

  Sticky – WordPress 6.2 (released in March this year) adds native sticky support.
  Non-standard font – Twentig plug-in.
  Latest 3 blog posts – Team Tangible‘s Loops & Logic plug-in.
  Gallery Lightbox – dFactory‘s responsive lightbox and gallery plug-in.
And here's the problem with WordPress. That's literally 4 lines of CSS and two lines of PHP, for which the author has now exposed themselves to four seperate third party plugin developers that he must trust explicitly forever.
1 comments

I'll grant you the sticky, the font, and heck, I'll even toss in the latest 3 blog posts too, but how in the heck is a gallery lightbox anywhere near 4 lines of CSS and two lines of PHP?

And unless I'm missing something, doesn't injecting PHP either require a plug-in or actively building on to a wordpress component?

>but how in the heck is a gallery lightbox anywhere near 4 lines of CSS and two lines of PHP?

Most implementations are massively bloated as a legacy from the jQuery days when that was neccessary. CSS is incredibly powerful now, and the browsers are all evergreen, so it's pretty trivial to implement a pure CSS/HTML gallery:

https://css-tricks.com/css-only-carousel/

This is fully featured, with indexing, scrolling, animation, etc., but you could slim that down even further to just a few lines for a simple automated slider. Obviously doesn't work if you need managed control, but 99% of gallery use-cases are just flipping through a homepage hero like the OP.

Appreciate the link. I agree that CSS has come a long way. Not sure I agree this carousel covers 99% of the use cases, if that's what you meant?

Regardless, my motivation was to implement as little as possible, as the whole motivation to switch to Wordpress was to not minimize what I'd have to build. I will make a note to detail that better in the future. Appreciate the candor.