About
What this site is, and how to make it your own.
Snippet Shelf is a deliberately small website: a handful of HTML pages and one stylesheet. There's no JavaScript, no framework, no build step and no server — open index.html in a browser and it works.
How it's built
- Semantic HTML — each cheat sheet is a set of
<dl>definition lists: the command in<dt>, the explanation in<dd>. - One stylesheet —
css/style.cssuses CSS custom properties for colour, so the palette lives in one place. - Automatic dark mode — a single
prefers-color-schememedia query swaps the tokens. - Responsive grid —
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))handles phones through widescreens with no breakpoints to babysit. - System fonts — nothing to download, so first paint is instant.
Adding a sheet
- Copy
git.htmltodocker.html(or whatever you like). - Change the title, the
page-headand the rows inside each.block. - Add a link in the
<nav>of every page and a card on the home page.
Hosting
Drop the folder on GitHub Pages, Netlify, Cloudflare Pages, an S3 bucket or any plain web server. Locally, python3 -m http.server from the project root is all you need — or just double-click index.html.
Keyboard-friendly
Every link is reachable with Tab, the current page is marked with aria-current="page", and colour contrast meets WCAG AA in both themes.