37 lines
872 B
Django/Jinja
37 lines
872 B
Django/Jinja
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<meta charset="utf-8" />
|
|
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
|
|
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
|
|
|
|
<py-config>
|
|
#packages = [ "jinja2" ]
|
|
packages = [
|
|
"https://cdn.jsdelivr.net/pyodide/v0.21.2/full/Jinja2-3.1.2-py3-none-any.whl",
|
|
"https://cdn.jsdelivr.net/pyodide/v0.21.2/full/MarkupSafe-2.1.1-cp310-cp310-emscripten_3_1_14_wasm32.whl",
|
|
"pyyaml"
|
|
]
|
|
|
|
autoclose_loader = true
|
|
[[runtime]]
|
|
name = "pyodide-0.21.2"
|
|
lang = "python"
|
|
src = "https://cdn.jsdelivr.net/pyodide/v0.21.2/full/pyodide.js"
|
|
</py-config>
|
|
|
|
<style>
|
|
{{ card_css_style }}
|
|
</style>
|
|
|
|
<script>
|
|
CARD_XPATHS_ENTRIES = ##JSON:://.##;
|
|
CARD_TEMPLATE
|
|
= {{ card_jinja2_template | to_json | replace("\\n", '\\n"\n + "') | safe }};
|
|
</script>
|
|
|
|
<py-script>
|
|
{##}
|
|
{{ card_pyscript | safe }}
|
|
{##}
|
|
</py-script>
|