Live data from Hacker News

How to build a website without frameworks and tons of libraries

kodingkitty.com

141–150 of 270 posts

Re: How to build a website without frameworks and tons of libraries

#143
post #103

Alright, I’m gonna be that guy. Right now, sveltekit + skeleton has absolutely blown my mind at how fast you can make a usable prototype. It’s honestly insane. You don’t even need to know svelte, really. As long as you can understand the file based routing thing, the rest is just html unless you really need more. Especially with the tailwind stuff built right in and a mostly vanilla looking theme. I’ve tried probably…

SvelteKit is amazing. I disagree about Skeleton though. Skeleton makes you feel productive and safe at first but it has a lot of foot-guns. It leads you down a happy path until you don't like something and then it's difficult to customize. You're much better off using DaisyUI or something headless like MeltUI when it's ready.

Take a look at Skeleton's own site https://www.skeleton.dev/docs/get-started Press page down - no scrolling happens. Hover your mouse over the navbar - no scrolling. Print the page - the content is cropped to only what's shown on the screen. I've raised this with them and it hasn't been a huge priority yet tones of sites are using this pattern from the component. Skeleton thinks you can just take your dark theme, invert the colours and end up with a decent looking light theme which just isn't the case.

With DaisyUI you get a more mature/performant/popular framework that takes accessibility seriously. It's amazing what they can achieve with just CSS animations and no JS. It solves the hard part (HTML, CSS) and let's you write the easy part (Svelte). You're also less locked into Svelte - you can much easily pull your DaisyUI html into a different framework.

Re: How to build a website without frameworks and tons of libraries

#144
post #10

This seems to fall into the 'simplistic, not simple' school of thought. You can have a relatively simple website if it doesn't do anything and if it cuts corners. Take your dark mode, which is just about the only nontrivial feature I see on this page. (One could also criticize the low contrast of the appearance and other problems, but that's less relevant to the simplicity thesis you're claiming.) First, your dark mo…

> First, your dark mode is implemented wrong in the lazy corner-cutting way of doing JS post-load ... I agree with your whole comment, but the media query approach is also tricky. You typically still want to offer a toggle while respecting prefers-color-scheme, and you may want to give priority to whatever choice the user has made with that toggle if they've used it on your site before. This still requires JS and loc…

The nuts-and-bolts implementation of inlined-CSS to avoid flash-of-white is separate from the UX toggle question, which is why I listed them as separate criticisms.

The former is just wrong of OP: no user wants the FOUC flash-of-white, end of story; similarly for some of the other solutions proposed here (block the entire page, really? talk about burning down the village to save it). The latter has more leeway for design: we settled on a tri-toggle to use the media-query but allow users to override and hardwire light/dark mode, and that seems to work most naturally. But there may be other contexts where something else would be better.

Indeed, for toggles, you could even try not having a toggle at all and relying on the system setting through the media-query. (However, as appealing as this is - why have separate controls when the user already has a global control and can enable/disable it? - we found this confused & angered users: https://gwern.net/design-graveyard#automatic-dark-mode So, gotta have a toggle. At least for now; maybe as dark-mode becomes universal, at some point users will become educated enough that you can afford to use only the system setting?)

Re: How to build a website without frameworks and tons of libraries

#145
I was reading just today about this project using

  "almost 14,000 lines of raw PHP mixed with inline HTML, CSS in  and raw JS in  tags"
and making $60,000/month. [1] Talk about non-pretentious stacks.

[1] https://twitter.com/levelsio/status/1675829733668319233

Re: How to build a website without frameworks and tons of libraries

#146
post #116

Earlier quoted context omitted.

99% of developers are out her building with php, .net or Java and its fine

In 2005 maybe

Perhaps not 99%, and perhaps not new sites, but I'll bet those three environments combined run more than 80% of sites right now.

Re: How to build a website without frameworks and tons of libraries

#147

Earlier quoted context omitted.

> First, your dark mode is implemented wrong in the lazy corner-cutting way of doing JS post-load ... I agree with your whole comment, but the media query approach is also tricky. You typically still want to offer a toggle while respecting prefers-color-scheme, and you may want to give priority to whatever choice the user has made with that toggle if they've used it on your site before. This still requires JS and loc…

Doesn't that make the page completely unreadable for those few who have Javascript disabled though?

Yes, this breaks the fundamental web concept of graceful degradation.

Re: How to build a website without frameworks and tons of libraries

#149

> Mind you, Hetzner webhosting starts at 2 EUR! How crazy is that? Oh yeah? and netlify is totally free for an infinite amount of sites! how crazy is that? > We use a short Python script with exactly 45 lines of code. Including comments and blank lines. > > In summary, this is the simple toolchain for building our web: > > Developer updates index.src.html > Watchdog.py detects the file change and ... > ... renders Ji…

Remove "fullstack" from your nickname! You have to earn it.

Re: How to build a website without frameworks and tons of libraries

#150

> Mind you, Hetzner webhosting starts at 2 EUR! How crazy is that? Oh yeah? and netlify is totally free for an infinite amount of sites! how crazy is that? > We use a short Python script with exactly 45 lines of code. Including comments and blank lines. > > In summary, this is the simple toolchain for building our web: > > Developer updates index.src.html > Watchdog.py detects the file change and ... > ... renders Ji…

Take a deep breath and go for a walk, there's no reason an inconsequential blog post should make you this angry.

[flagged]
Post reply on HN