Skip to content

Commit 1faee6d

Browse files
authored
Cleanup and add files (#1)
1 parent a096cb3 commit 1faee6d

32 files changed

+60
-6366
lines changed

README.md

+5-25
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
1-
# JupyterLite Demo
1+
# Anywidget Lite
22

3-
[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlite.github.io/demo)
3+
[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jtpio.github.io/anywidget-lite)
44

5-
JupyterLite deployed as a static site to GitHub Pages, for demo purposes.
5+
Prototype your Jupyter Widget in the browser with anywidget and JupyterLite 💡
66

7-
## ✨ Try it in your browser ✨
7+
## Usage
88

9-
➡️ **https://jupyterlite.github.io/demo**
10-
11-
![github-pages](https://user-images.githubusercontent.com/591645/120649478-18258400-c47d-11eb-80e5-185e52ff2702.gif)
12-
13-
## Requirements
14-
15-
JupyterLite is being tested against modern web browsers:
16-
17-
- Firefox 90+
18-
- Chromium 89+
19-
20-
## Deploy your JupyterLite website on GitHub Pages
21-
22-
Check out the guide on the JupyterLite documentation: https://jupyterlite.readthedocs.io/en/latest/quickstart/deploy.html
23-
24-
## Further Information and Updates
25-
26-
For more info, keep an eye on the JupyterLite documentation:
27-
28-
- How-to Guides: https://jupyterlite.readthedocs.io/en/latest/howto/index.html
29-
- Reference: https://jupyterlite.readthedocs.io/en/latest/reference/index.html
9+
TODO

content/anywidget.ipynb

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"metadata": {
3+
"kernelspec": {
4+
"name": "python",
5+
"display_name": "Python (Pyodide)",
6+
"language": "python"
7+
},
8+
"language_info": {
9+
"codemirror_mode": {
10+
"name": "python",
11+
"version": 3
12+
},
13+
"file_extension": ".py",
14+
"mimetype": "text/x-python",
15+
"name": "python",
16+
"nbconvert_exporter": "python",
17+
"pygments_lexer": "ipython3",
18+
"version": "3.8"
19+
}
20+
},
21+
"nbformat_minor": 4,
22+
"nbformat": 4,
23+
"cells": [
24+
{
25+
"cell_type": "code",
26+
"source": "%pip install anywidget",
27+
"metadata": {
28+
"trusted": true
29+
},
30+
"outputs": [],
31+
"execution_count": null
32+
},
33+
{
34+
"cell_type": "code",
35+
"source": "import anywidget\nimport traitlets\n\nclass CounterWidget(anywidget.AnyWidget):\n _esm = \"\"\"\n function render({ model, el }) {\n let getCount = () => model.get(\"count\");\n let button = document.createElement(\"button\");\n button.classList.add(\"counter-button\");\n button.innerHTML = `count is ${getCount()}`;\n button.addEventListener(\"click\", () => {\n model.set(\"count\", getCount() + 1);\n model.save_changes();\n });\n model.on(\"change:count\", () => {\n button.innerHTML = `count is ${getCount()}`;\n });\n el.appendChild(button);\n }\n\texport default { render };\n \"\"\"\n _css=\"\"\"\n .counter-button { background-color: #ea580c; }\n .counter-button:hover { background-color: #9a3412; }\n \"\"\"\n count = traitlets.Int(0).tag(sync=True)\n\ncounter = CounterWidget()\ncounter.count = 42\ncounter",
36+
"metadata": {
37+
"trusted": true
38+
},
39+
"outputs": [],
40+
"execution_count": null
41+
},
42+
{
43+
"cell_type": "code",
44+
"source": "",
45+
"metadata": {
46+
"trusted": true
47+
},
48+
"outputs": [],
49+
"execution_count": null
50+
}
51+
]
52+
}

content/data/Museums_in_DC.geojson

-1
This file was deleted.

content/data/bar.vl.json

-54
This file was deleted.

content/data/fasta-example.fasta

-8
This file was deleted.

content/data/iris.csv

-151
This file was deleted.

content/data/matplotlib.png

-25.8 KB
Binary file not shown.

content/javascript.ipynb

-86
This file was deleted.

0 commit comments

Comments
 (0)