docs: a Markdown reader on the site, and the flag stays up

Two additions to docs/Website.

**The reader.** docs.html renders the 29 documents in docs/ in the site's own
theme -- index down the left, table of contents down the right, and links
between documents rewritten so ../history/schfs.md navigates inside the
reader instead of downloading a file.

The parser is ~150 lines in docs.js, not a dependency: it handles exactly
what docs/ uses, and a Markdown library would outweigh every other asset here
combined. Everything is escaped before a tag is emitted, so the only HTML
that reaches the page is HTML docs.js wrote. Verified by rendering all 30
documents (302 KB of Markdown) with zero failures, no unrestored sentinels
and no runaway loops.

One caveat, stated in the page itself rather than hidden: browsers block
fetch() on file:// URLs, so this page needs a server. It says so, with the
command, and offers the raw file as a fallback. The rest of the site is
unaffected.

**The flag.** A Progress Pride flag in the top bar and a line in the footer,
on both pages, permanently. Support with an end date is marketing. It is
deliberately small and deliberately not a page of its own -- this is an
operating system, and the flag is a statement, not a subject.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VQ7Qx8E1q1M1bbCq8QLHS2
This commit is contained in:
Nexoniarz 2026-09-12 21:53:06 +02:00
commit ef94fac4ac
6 changed files with 708 additions and 8 deletions

View file

@ -5,12 +5,49 @@ Three files and a folder of marks. No build step, no dependencies, no
framework — open `index.html` and it works, including from a `file://` URL.
```
index.html the page
index.html the front page
docs.html the documentation reader
style.css the palette, transcribed from include/theme.h
app.js two behaviours: the boot log types, sections fade in
Assets/ shift.svg (the logo), uberblock.svg (SchFS), guru.svg (PSOGM)
app.js the front page: the boot log types, sections fade in
docs.js the Markdown renderer and the doc index
Assets/ shift.svg (logo), uberblock.svg (SchFS), guru.svg (PSOGM),
pride.svg
```
## The docs reader
`docs.html` renders the Markdown in `docs/` in the site's own theme, with the
index down the left and a table of contents down the right. Links between
documents are rewritten to stay inside the reader, so `../history/schfs.md`
in an architecture page navigates rather than downloads.
The parser is about 150 lines in `docs.js` and handles what `docs/` actually
uses: headings, fenced code, tables, lists, quotes, rules and inline marks.
A Markdown library would be larger than everything else here put together.
Every document is escaped before a single tag is emitted — the only HTML that
reaches the page is HTML `docs.js` wrote.
**This one page needs a server.** Browsers refuse `fetch()` on `file://` for
the same reason they refuse it cross-origin, so opening `docs.html` from a
file gives a panel explaining that instead of the docs. Everything else works
from a file. To read them locally:
```sh
cd /home/nexoniarz/Dokumenty/Projects/SchOS
python3 -m http.server 8000
# then http://localhost:8000/docs/Website/docs.html
```
Adding a document means adding one line to the `DOCS` array in `docs.js`. The
reader will only load a path that appears there.
## The flag
`Assets/pride.svg` is in the top bar and in the footer, on both pages, and it
is not seasonal. Support with an end date is marketing; this is a project that
belongs to whoever writes it. It is also deliberately small — the site is
about an operating system, and the flag is a statement, not a subject.
## The rules it follows
**The palette is not a design decision.** It is `include/theme.h`, copied. A