diff --git a/pyscriptjs/examples/index.html b/pyscriptjs/examples/index.html index 6710acf..4f59504 100644 --- a/pyscriptjs/examples/index.html +++ b/pyscriptjs/examples/index.html @@ -42,6 +42,9 @@ WARNING: This examples takes a little longer to load. So be patient :)

+

Freedom Units!

+

A Toga application (a Fahrenheit to Celsius converter), rendered as a Single Page App

+

Simple d3 visualization

Minimal d3 demo demonstrating how to create a visualization

diff --git a/pyscriptjs/examples/toga/freedom.html b/pyscriptjs/examples/toga/freedom.html new file mode 100644 index 0000000..3cbeb4d --- /dev/null +++ b/pyscriptjs/examples/toga/freedom.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + Loading... + + +
Loading...
+ + + + + + + +import asyncio +import micropip + +await micropip.install([ + './static/wheels/travertino-0.1.3-py3-none-any.whl', + './static/wheels/toga_core-0.3.0.dev33-py3-none-any.whl', + './static/wheels/toga_web-0.3.0.dev33-py3-none-any.whl', + './static/wheels/freedom-0.0.1-py3-none-any.whl', +]) + +from toga_web.dom import handle as dom_handle +from toga import platform + +platform.current_platform = 'web' + +from freedom.__main__ import main + +app = main().main_loop(spa=True) + + + \ No newline at end of file