pyscript minimum working example

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2026-05-31 15:39:50 +02:00
parent 9d09803ddc
commit 38a192abb6
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
4 changed files with 63 additions and 1 deletions

View file

@ -2,6 +2,7 @@
#import "./html_body.typ": html_body
#import "./html_utils.typ": html_show
#import "./summary.typ": summary, card-list
#import "./pyscript.typ": state-use-pyscript, state-pyscript-headers, state-pyscript-version, pyscript
#import "./rss.typ": rss
#import "./icons.typ"
@ -31,6 +32,10 @@
stylesheets: (),
/// List of related sites for metadata
me-links: (),
/// Dictionnary of available tags to add in header for each versions of pyscript
pyscript-headers: (:),
/// Pyscript version to use
pyscript-version: none,
//-- Body --
/// Array of element to add on the top left of the page
nav-elements: none,
@ -47,6 +52,10 @@
body
) = {
assert(type(url) == str, message: "A page must have an url")
context {
state-pyscript-headers.update(x => pyscript-headers)
state-pyscript-version.update(x => pyscript-version)
}
show: html_show
html.html(lang: lang, {
html_head(