diff --git a/panel_editor/README.md b/panel_editor/README.md new file mode 100644 index 0000000..029db4c --- /dev/null +++ b/panel_editor/README.md @@ -0,0 +1,11 @@ +# Simple Panel Pyscript Editor Example + +This is a basic example of an editable [Panel](https://panel.holoviz.org/) application in the PyScript editor. This example is aimed for you to get up and running with Panel and the PyScript editor so you can extend it to your own needs. + +Please note that if you are running this example on your own server or locally, you will have to set appropriate headers or use `mini-coi` as described in [Pyscript Web Workers](https://docs.pyscript.net/latest/user-guide/workers/). + +For more about using Panel with Pyscript, see [Running Panel in WASM](https://panel.holoviz.org/how_to/wasm/index.html). + +## Libraries Used + +- [Panel](https://panel.holoviz.org/) diff --git a/panel_editor/assets/css/examples.css b/panel_editor/assets/css/examples.css new file mode 100644 index 0000000..0ac743f --- /dev/null +++ b/panel_editor/assets/css/examples.css @@ -0,0 +1,58 @@ +body { + margin: 0; +} + +.pyscript { + margin: 0.5rem; +} + +html { + font-family: + ui-sans-serif, + system-ui, + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + Roboto, + "Helvetica Neue", + Arial, + "Noto Sans", + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + "Noto Color Emoji"; + line-height: 1.5; +} + +nav { + position: sticky; + width: 100%; + top: 0; + left: 0; + z-index: 9999; +} + +.logo { + padding-right: 10px; + font-size: 28px; + height: 30px; + max-width: inherit; +} + +.title { + text-decoration: none; + text-decoration-line: none; + text-decoration-style: initial; + text-decoration-color: initial; + font-weight: 400; + font-size: 1.5em; + line-height: 2em; + white-space: nowrap; +} + +.app-header, .app-header a { + display: flex; + align-items: center; + padding: 0.5rem 1rem; +} diff --git a/panel_editor/assets/favicon.png b/panel_editor/assets/favicon.png new file mode 100644 index 0000000..0e2c5cc Binary files /dev/null and b/panel_editor/assets/favicon.png differ diff --git a/panel_editor/assets/logo.png b/panel_editor/assets/logo.png new file mode 100644 index 0000000..faa0097 Binary files /dev/null and b/panel_editor/assets/logo.png differ diff --git a/panel_editor/index.html b/panel_editor/index.html new file mode 100644 index 0000000..201051b --- /dev/null +++ b/panel_editor/index.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + Panel Example + + + + + + + + + + + + + + + + +
+ + + diff --git a/panel_editor/pyscript.toml b/panel_editor/pyscript.toml new file mode 100644 index 0000000..59e4a65 --- /dev/null +++ b/panel_editor/pyscript.toml @@ -0,0 +1,6 @@ +name = "Simple Panel PyScript Editor Example" +description = "A basic Panel application to be used with the PyScript editor." +packages = [ + "https://cdn.holoviz.org/panel/wheels/bokeh-3.5.0-py3-none-any.whl", + "https://cdn.holoviz.org/panel/wheels/panel-1.5.0b2-py3-none-any.whl" +]