diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 13:05:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 13:16:47 -0300 |
| commit | f700b2af8e874c586e6996b8311c3983203c6637 (patch) | |
| tree | 89c7de940f888a0917e5851c8a362c83de50b389 /docs/site/site.typ | |
| parent | f6a511c61d7ef2ff680f70077b236559a595be69 (diff) | |
| download | pardes-f700b2af8e874c586e6996b8311c3983203c6637.tar.gz pardes-f700b2af8e874c586e6996b8311c3983203c6637.zip | |
Builtins are chips that link to a glossary generated from the registry, and the virtual filesystem is drawn as a tree
#word draws a builtin as a chip on the tag's ground over a rule (Look and
Exec in acme's look green and exec red), a <code class="word"> in HTML,
and links it to its entry in a new Builtins chapter wherever that
chapter is in the same output (the book, the site). The chapter is
drawn from docs/typ/builtins-tty.json and builtins-gui.json, which
`zig build builtins-json -Dplatform=tty|gui` writes from the registry
and the Help rows (src/builtins_json.zig, tools/gen_builtins_json.zig;
summaryOf in ninep/ctl.zig is now pub); style.typ merges them, marking
the window-only words. The doc steps refresh their build's file first,
and each build's unit-test fails when its file is stale. Everyday words
first (`everyday` in style.typ), then groups by leader prefix as Help
has them, then settings, the words with no path, debugging and
internals, and last an A-Z index of every word. `zig build book` joins
the doc steps.
#fstree draws a directory tree with its connectors, a description
column and links to the sections that document each file; reference.typ
draws the served tree with it, each pane, pty and column file on its
own line, and a test in config.zig checks it against ninep/tree.zig's
files both ways. The cheatsheet has a two-level version. On the site
the tree reads as `tree` text in w3m and wraps descriptions under the
names on a phone.
The site's tutor draws its B1, B2, B3 and 1-2 chords as mouse glyphs;
the landing credits Plan 9 and acme, as does the book's title page;
install.typ no longer lists the mirrors (the footer does).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/site/site.typ')
| -rw-r--r-- | docs/site/site.typ | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/docs/site/site.typ b/docs/site/site.typ index afcd1041..52e19b01 100644 --- a/docs/site/site.typ +++ b/docs/site/site.typ @@ -4,7 +4,7 @@ // typst compile --root . --format bundle --features bundle,html docs/site/site.typ OUT // Every link is relative and every page sits at the top of OUT, so the site // works from file:// and from any static server. -#import "../typ/style.typ": chapters, tutor-path, doc-links, project +#import "../typ/style.typ": chapters, tutor-path, doc-links, project, btn, chord #let clips = toml("media/clips.toml").clip #let casts = toml("casts/casts.toml").cast @@ -23,6 +23,9 @@ or finds the word) and middle-click runs it (a builtin or a shell command). Read PDFs and source, edit code and use terminals with it, in a terminal or in its own window.], + credit: [It is built on ideas from #link("https://9p.io/plan9/")[Plan 9] from + Bell Labs: #link("https://9p.io/sys/doc/acme/acme.html")[acme]'s text as + the interface, and the 9P protocol.], status: [Linux; macOS in progress. Version #version.], terminal: [In a terminal], window: [In its own window], @@ -154,6 +157,7 @@ #document(href("index"), title: "pardes", shell("index", "pardes")[ #el("h1", (class: "masthead"))[pardes] #el("p", (class: "lead"))[#landing.lead] + #el("p", (class: "credit"))[#landing.credit] #el("p", (class: "runs"))[#landing.status] #el("div", (class: "start"))[ #for s in landing.start { @@ -197,8 +201,22 @@ ]) } +/// The tutor's text with its mouse buttons drawn: B1, B2, B3 and the +/// chords it writes 1-2 (hold 1, click 2) become the docs' mouse glyphs, +/// each with its hidden words, inside the preformatted block. +#let tutor-text(t) = { + let at = 0 + for m in t.matches(regex("\\bB([123])\\b|\\b([123])-([123])\\b")) { + t.slice(at, m.start) + if m.captures.at(0) != none { btn("B" + m.captures.at(0)) } + else { chord("B" + m.captures.at(1), "B" + m.captures.at(2)) } + at = m.end + } + t.slice(at) +} + #document(href("tutor"), title: "The tutor", shell("tutor", "The tutor")[ #heading(level: 1)[The tutor] <tutor> The tutor as the editor shows it (#raw("Tutor"), or #raw("SPC h t")). - #el("pre", (class: "tutor"))[#read(tutor-path)] + #el("pre", (class: "tutor"))[#tutor-text(read(tutor-path))] ]) |
