Embedding video, adding PS tag definitions (#403)

* Embedding video, adding PS tag definitions

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* html -> HTML; add sphinxcontrib.youtube to env.yml

* change place of sphinxcontrib.youtube in env.yml

* one more sphinxcontrib-youtube change

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
idanenglander
2022-05-18 09:03:46 -05:00
committed by GitHub
parent b767a78b05
commit 0d946f853f
4 changed files with 25 additions and 5 deletions

View File

@@ -72,13 +72,13 @@ print(s)
### Writing into labeled elements
In the example above, we had a single `<py-script>` tag and it printed
In the example above, we had a single `<py-script>` tag printing
one or more lines onto the page in order. Within the `<py-script>`, you
have access to the `pyscript` module, which provides a `.write()` method
to send strings into labeled elements on the page.
For example, we'll add some style elements and provide place holders for
the `<py-script>` tag write to.
the `<py-script>` tag to write to.
```html
<html>
@@ -109,12 +109,12 @@ pyscript.write('pi', f'π is approximately {pi:.3f}')
</html>
```
## Packages and modules
## The py-env tag
In addition to the [Python Standard Library](https://docs.python.org/3/library/) and
the `pyscript` module, many 3rd-party OSS packages will work out-of-the-box with PyScript.
In order to use them, you will need to declare the dependencies using the `<py-env>` in the
In order to use them, you will need to declare the dependencies using the `<py-env>` tag in the
HTML head. You can also link to `.whl` files directly on disk like in our [toga example](https://github.com/pyscript/pyscript/blob/main/pyscriptjs/examples/toga/freedom.html).
```
@@ -207,3 +207,18 @@ fig
</body>
</html>
```
## The py-repl tag
The `<py-repl>` tag creates a REPL component that is rendered to the page as a code editor, allowing you to write executable code inline.
## Visual components
The following tags control visual attributes of your HTML page.
| Tag | Description |
| --- | ----------- |
| `<py-inputbox>` | TBD |
| `<py-box>` | TBD |
| `<py-button>` | TBD |
| `<py-list>` | TBD |
| `<py-title>` | TBD |