A Theme Toggle Without JavaScript
A practical walkthrough of building a persistent light/dark theme toggle without JavaScript, using only a Laravel route, a cookie, Blade-rendered state, and CSS variables.
$ cat welcome.txt
Welcome to the Terminal Blog
Thoughts on aviation, code, cybersecurity, scuba diving, and the engineering discipline required to operate complex systems safely.
Written in plain text. No fluff.
A practical walkthrough of building a persistent light/dark theme toggle without JavaScript, using only a Laravel route, a cookie, Blade-rendered state, and CSS variables.
The most interesting part of an equipment failure sometimes happens after the event. Once the dive is over and the immediate problem is solved, the mind begins replaying the scenario — analysing decisions, imagining alternatives, and quietly updating its internal safety model. A recent regulator failure during a dive became a useful reminder of how humans process risk in complex environments.
A blog does not require a CMS, a headless frontend, or an ecosystem of packages to function well. In Laravel, a clean publishing system can be built with a single model, a focused controller, and a handful of Blade views. This article walks through a minimal, disciplined approach to building a simple blog — one that prioritises structure, clarity, and long-term maintainability over unnecessary complexity.