pyscript minimum working example
This commit is contained in:
parent
9d09803ddc
commit
38a192abb6
4 changed files with 63 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue