summaryrefslogtreecommitdiff
path: root/docs/site/site.typ
diff options
context:
space:
mode:
Diffstat (limited to 'docs/site/site.typ')
-rw-r--r--docs/site/site.typ22
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))]
])