wip docs rework

This commit is contained in:
David Allemang
2026-06-19 15:35:04 -04:00
committed by David Allemang
parent a503cf2c83
commit c7d0d324bb
10 changed files with 65 additions and 45 deletions

View File

@@ -1,6 +1,4 @@
#import "/docs.typ": docs-page, note, warn #let warn = block
#show: docs-page("index.html", footer: none, header: none)
#title() #title()

View File

@@ -1,7 +1,3 @@
#import "/docs.typ": docs-page, note, tip, warn
#show: docs-page("/core.html")
= Core Mechanics = Core Mechanics
== Entity IDs == Entity IDs

View File

@@ -1,7 +1,3 @@
#import "/docs.typ": docs-page, note, tip, warn
#show: docs-page("interference.html")
= Interference = Interference
== Other Entities == Other Entities

View File

@@ -1,7 +1,3 @@
#import "/docs.typ": docs-page, note, tip, warn
#show: docs-page("/tilesets.html")
= Global Ticking Order = Global Ticking Order
== Tilesets == Tilesets

View File

@@ -1,7 +1,3 @@
#import "/docs.typ": docs-page, note, tip, warn
#show: docs-page("/design-tips.html")
= Design Tips = Design Tips
== Synchronization == Synchronization

View File

@@ -1,7 +1,3 @@
#import "/docs.typ": docs-page, note, tip, warn
#show: docs-page("/channels.html")
= Channels = Channels
== Static Channel Allocation == Static Channel Allocation

View File

@@ -1,7 +1,3 @@
#import "/docs.typ": docs-page, note, tip, warn
#show: docs-page("/transport-protocols.html")
= Transport Protocols = Transport Protocols
== Mod 4 Binary == Mod 4 Binary

View File

@@ -1,7 +1,3 @@
#import "/docs.typ": docs-page, note, tip, warn
#show: docs-page("/bulk-transport.html")
= Bulk Transport = Bulk Transport
== Tileable Receivers == Tileable Receivers

View File

@@ -1,7 +1,3 @@
#import "/docs.typ": docs-page, note, tip, warn
#show: docs-page("/network-protocols.html")
= Network Protocols = Network Protocols
== Collision Prevention == Collision Prevention

View File

@@ -1,14 +1,68 @@
#set heading(numbering: "1.1 -") #set heading(numbering: "1.1 -")
#set document(title: [The EID Wireless Masterclass]) #set document(title: [The EID Wireless Masterclass])
#include "static/index.typ" #asset("/style.css", read("static/style.css", encoding: none))
#include "content/00-index.typ" #let html-title = state("html-title", context document.title)
#include "content/01-core.typ"
#include "content/02-interference.typ" #let rawdoc(path, body) = document(path, html.html({
#include "content/03-tileset.typ" html.head({
#include "content/04-design.typ" html.meta(charset: "utf-8")
#include "content/05-channels.typ" html.meta(name: "viewport", content: "width=device-width, initial-scale=1")
#include "content/06-transport.typ" html.meta(name: "color-scheme", content: "dark light")
#include "content/07-bulk.typ" html.link(rel: "stylesheet", href: "/style.css")
#include "content/08-network.typ" html.title(context html-title.get())
})
html.body({ body })
}))
#show document: it => {
html-title.update(old => context {
let top = query(selector(heading.where(level: 1, outlined: true)).within(it.location())).first(default: none)
if top != none { return [#top.body - #document.title] } else { return old }
})
it
}
#let doc(path, main) = rawdoc(path, {
html.header()
html.main(id: "main", main)
html.footer()
})
// #let doc(path, main) = rawdoc(path, ..args, html.html({
// html.head({
// html.meta(charset: "utf-8")
// html.meta(name: "viewport", content: "width=device-width, initial-scale=1")
// html.meta(name: "color-scheme", content: "dark light")
// html.link(rel: "stylesheet", href: "/style.css")
// html.title(context document.title)
// })
// html.body({
// html.header(context {
// let doc = query(document).first()
// par(link(doc.location(), doc.title))
//
// let doc = query(selector(document).before(here())).last()
// let ch = query(selector(heading.where(level: 1, outlined: true)).within(doc.location())).first()
// outline(title: none, target: selector(heading).within(doc.location()))
//
// let next = query(selector(document).after(doc.location(), inclusive: false)).first(default: none)
// let prev = query(selector(document).before(doc.location(), inclusive: false)).last(default: none)
// })
// html.main(id: "main", { main })
// html.footer({})
// })
// }))
#{
rawdoc("/index.html", include "content/00-index.typ")
doc("/core.html", include "content/01-core.typ")
doc("/interference.html", include "content/02-interference.typ")
doc("/tileset.html", include "content/03-tileset.typ")
doc("/design.html", include "content/04-design.typ")
doc("/channels.html", include "content/05-channels.typ")
doc("/transport.html", include "content/06-transport.typ")
doc("/bulk.html", include "content/07-bulk.typ")
doc("/network.html", include "content/08-network.typ")
}