start migration to bundle format
This commit is contained in:
parent
64e270a868
commit
7fe9b99535
13 changed files with 378 additions and 470 deletions
|
|
@ -1,11 +1,13 @@
|
|||
#import "./html_utils.typ": add-tag-in-head
|
||||
|
||||
#let state-use-pyscript = state("state-use-pyscript", false)
|
||||
#let state-pyscript-version = state("state-pyscript-version", none)
|
||||
#let state-pyscript-data-list = state("state-pyscript-data-list", (:))
|
||||
#let state-pyscript-interpreters = state("state-pyscript-interpreters", (:))
|
||||
#let state-pyscript-default-interpreter = state("state-pyscript-default-interpreter", none)
|
||||
#let state-pyscript-canvas-ids = state("state-pyscript-canvas-ids", ())
|
||||
#import "./states.typ": (
|
||||
state-use-pyscript,
|
||||
state-pyscript-version,
|
||||
state-pyscript-data-list,
|
||||
state-pyscript-interpreters,
|
||||
state-pyscript-default-interpreter,
|
||||
state-pyscript-canvas-ids,
|
||||
current-page-label,
|
||||
)
|
||||
|
||||
/// Define data needed to load a version of pyscript
|
||||
#let pyscript-data(
|
||||
|
|
@ -139,7 +141,9 @@
|
|||
if canvas-attr != none {
|
||||
html.elem("canvas", attrs: ("id": canvas-attr))
|
||||
|
||||
let core-js-url = state-pyscript-data-list.final().at(state-pyscript-version.final()).core-js-url
|
||||
let page-label = current-page-label.at(here())
|
||||
let end-page-label = label(str(page-label) + "-end")
|
||||
let core-js-url = state-pyscript-data-list.at(end-page-label).at(state-pyscript-version.at(end-page-label)).core-js-url
|
||||
add-tag-in-head(
|
||||
html.script(
|
||||
type: "module",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue