How to build a website without frameworks and tons of libraries
This seems to fall into the &#x27;simplistic, not simple&#x27; school of thought. You can have a relatively simple website if it doesn&#x27;t <i>do</i> anything and if it cuts corners.<p>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&#x27;s less relevant to the simplicity thesis you&#x27;re claiming.)<p>First, your dark mode is implemented wrong in the lazy corner-cutting way of doing JS post-load instead of the correct way of CSS body classes; so you get the &#x27;flash of white&#x27; unavoidably on every page load - just what every dark mode user with their phone to their face at midnight wants to see! (If your solution doesn&#x27;t work, it doesn&#x27;t matter if it&#x27;s &#x27;simple&#x27; or &#x27;complex&#x27;.)<p>Second, you implement what is like 3 lines of JS (setting localstorage &amp; dark-mode) by pulling in what looks like an entire interpreter for a custom &#x27;hyperscript&#x27; <a href="https:&#x2F;&#x2F;hyperscript.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;hyperscript.org&#x2F;</a> language which seems to mostly just offer some sugar over JS; now, maybe you use &#x27;hyperscript&#x27; elsewhere for reasonable purposes, but surely pulling in a 96kb (uncached) library solely to run<p>def saveMode() if first classList.value of &lt;html&#x2F;&gt; contains &#x27;dark&#x27; set localStorage.kkColorMode to &#x27;dark&#x27; else  set localStorage.kkColorMode to &#x27;light&#x27; end end<p><pre><code>  init if localStorage.kkColorMode is empty set localStorage.kkColorMode to &#x27;light&#x27; end if localStorage.kkColorMode is &#x27;dark&#x27; add .dark to &lt;html&#x2F;&gt; end
</code></pre>
is a bit against the spirit of this &quot;simplicity is the ultimate perfection&quot; enterprise...? Personally, I feel like I see some easy perfection to add right there. (And is this hyperscript stuff also why the HTML doesn&#x27;t validate?)<p>Third, this binary toggle is a bad way to implement dark mode because it ignores system&#x2F;browser settings, so if a user has, say, enabled dark-mode on their smartphone OS, they still get served light-mode until they manually enable it; note that some systems change it based on local time&#x2F;ambient light too, which is quite nice... if websites &amp; apps respect it instead of overriding it. And since localstorage expires and users switch devices, they would have to do so repeatedly. Is this a good thing? A user probably would disagree with the developer who is touting how &#x27;simple&#x27; the dark-mode implementation is because they cut corners in handling system settings&#x2F;auto-dark-mode...