Pinned 2026 toolchains (Go 1.26, Rust 1.98/edition 2024, Python 3.14 + uv, Node 24, Zig 0.16, NixOS 26.05), postgres 18 / mongo 8, lockfiles built from, non-root runtimes, .dockerignore, per-project LICENSE, READMEs with the git.devai.io clone line, checkout@v7 CI. Security fixes in the legacy Rust APIs (any-password login, self-assigned admin, hard-coded JWT secret), JWT alg/exp/sub enforcement across the blog series, safe markdown links in the frontends, and many smaller bugs — every project was built, run and exercised end to end. Adds scripts/publish.sh + a CI publish job that splits every folder into its own repo at git.devai.io/templates/<folder>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01128fhuZbgivaSJvtMf4s1G
36 lines
1.2 KiB
HTML
36 lines
1.2 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Dark Mode Toggle</title>
|
|
<link rel="stylesheet" href="styles.css" />
|
|
<script>
|
|
// Runs before the first paint, so a saved theme never flashes the wrong colors.
|
|
if (localStorage.getItem("theme")) document.documentElement.dataset.theme = localStorage.getItem("theme");
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<main class="card">
|
|
<h1>Dark Mode Toggle</h1>
|
|
<p class="sub">One button, two themes — and it remembers your pick.</p>
|
|
|
|
<button id="toggle" class="btn" type="button" aria-pressed="false">
|
|
<span id="toggleIcon" aria-hidden="true">🌙</span>
|
|
<span>Dark mode</span>
|
|
</button>
|
|
|
|
<section class="demo">
|
|
<h2>Preview</h2>
|
|
<p>
|
|
This little card follows the theme. Watch the background, the text, and
|
|
the accent color all swap when you flip the switch.
|
|
</p>
|
|
<a class="link" href="#">An accent-colored link</a>
|
|
<div class="swatch" aria-hidden="true"></div>
|
|
</section>
|
|
</main>
|
|
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|