multimodal
This commit is contained in:
88
main.typ
88
main.typ
@@ -1,24 +1,31 @@
|
||||
#set page("us-letter", margin: 0.5in)
|
||||
#set heading(numbering: "1.1 -")
|
||||
#set document(title: [The EID Wireless Masterclass])
|
||||
|
||||
#asset("/mojangles-ascii.woff2", read("static/mojangles-ascii.woff2", encoding: none))
|
||||
#asset("/style.css", read("static/style.css", encoding: none))
|
||||
#context if target() == "bundle" {
|
||||
asset("/mojangles-ascii.woff2", read("static/mojangles-ascii.woff2", encoding: none))
|
||||
asset("/style.css", read("static/style.css", encoding: none))
|
||||
}
|
||||
|
||||
#let index() = query(document).first()
|
||||
#let chapter = state("chapter", context (doc: index(), top: none, loc: index().location()))
|
||||
|
||||
#let rawdoc(path, body) = document(path, 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({
|
||||
body
|
||||
})
|
||||
}))
|
||||
#let rawdoc(path, body) = context if target() == "bundle" {
|
||||
document(path, 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({
|
||||
body
|
||||
})
|
||||
}))
|
||||
} else {
|
||||
body
|
||||
}
|
||||
|
||||
#show document: it => {
|
||||
set document(title: context {
|
||||
@@ -33,26 +40,47 @@
|
||||
it
|
||||
}
|
||||
|
||||
#let doc(path, main) = rawdoc(path, {
|
||||
html.header(context {
|
||||
link(index().location(), title(index().title))
|
||||
let target = selector(heading).within(chapter.get().loc).or(heading.where(level: 1))
|
||||
outline(title: none, target: target)
|
||||
divider()
|
||||
})
|
||||
html.main(id: "main", main)
|
||||
html.footer(context {
|
||||
let next = query(selector(heading.where(level: 1, outlined: true)).after(here())).first(default: none)
|
||||
|
||||
if next != none {
|
||||
#let doc(path, main) = context if target() == "bundle" {
|
||||
rawdoc(path, {
|
||||
html.header(context {
|
||||
link(index().location(), title(index().title))
|
||||
let target = selector(heading).within(chapter.get().loc).or(heading.where(level: 1))
|
||||
outline(title: none, target: target)
|
||||
divider()
|
||||
show outline.entry: it => [Next: #it]
|
||||
outline(title: none, target: next.location())
|
||||
}
|
||||
})
|
||||
html.main(id: "main", main)
|
||||
html.footer(context {
|
||||
let next = query(selector(heading.where(level: 1, outlined: true)).after(here())).first(default: none)
|
||||
|
||||
if next != none {
|
||||
divider()
|
||||
show outline.entry: it => [Next: #it]
|
||||
outline(title: none, target: next.location())
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
} else {
|
||||
main
|
||||
}
|
||||
|
||||
#{
|
||||
show: it => context if target() == "html" {
|
||||
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.title(context document.title)
|
||||
html.style(read("static/style.css"))
|
||||
})
|
||||
html.body({
|
||||
html.main(id: "main", { it })
|
||||
})
|
||||
})
|
||||
} else {
|
||||
it
|
||||
}
|
||||
|
||||
rawdoc("/index.html", include "content/00-index.typ")
|
||||
doc("/core.html", include "content/01-core.typ")
|
||||
doc("/interference.html", include "content/02-interference.typ")
|
||||
|
||||
Reference in New Issue
Block a user