Skip to content

Commit ad1b57d

Browse files
authored
Merge pull request #15 from t-strings/update-examples
Refactor example notebooks to improve formatting and readability
2 parents 4101729 + 025dfb5 commit ad1b57d

36 files changed

+125
-288
lines changed

content/boolean_attribute_value.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "1051a8e7",
6+
"id": "7c7af2e8",
77
"metadata": {},
88
"outputs": [],
99
"source": [
@@ -13,7 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": null,
16-
"id": "394eacaf",
16+
"id": "6d0a86c8",
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -23,7 +23,7 @@
2323
{
2424
"cell_type": "code",
2525
"execution_count": null,
26-
"id": "7b4d8476",
26+
"id": "1c021fcc",
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [

content/call_function.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "eb0e8234",
6+
"id": "4348a0e3",
77
"metadata": {},
88
"outputs": [],
99
"source": [
@@ -13,7 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": null,
16-
"id": "f508f146",
16+
"id": "4249496e",
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -23,7 +23,7 @@
2323
{
2424
"cell_type": "code",
2525
"execution_count": null,
26-
"id": "368c5c9f",
26+
"id": "bd322eea",
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
@@ -35,13 +35,13 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "2d56b175",
38+
"id": "aa3495d3",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
4242
"def main():\n",
4343
" \"\"\"Main entry point.\"\"\"\n",
44-
" name = \"viewdom\"\n",
44+
" name = \"tdom\"\n",
4545
" result = html(t\"<div>Hello {make_bigly(name)}</div>\")\n",
4646
" return result"
4747
]

content/child_nodes.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "19a08004",
6+
"id": "aae25e85",
77
"metadata": {},
88
"outputs": [],
99
"source": [
@@ -14,7 +14,7 @@
1414
{
1515
"cell_type": "code",
1616
"execution_count": null,
17-
"id": "f8bf6dee",
17+
"id": "e7f46ae7",
1818
"metadata": {},
1919
"outputs": [],
2020
"source": [

content/children_props.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "14ec6992",
6+
"id": "5a1ea12f",
77
"metadata": {},
88
"outputs": [],
99
"source": [
@@ -13,7 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": null,
16-
"id": "faf088d2",
16+
"id": "ef2d0d90",
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -23,7 +23,7 @@
2323
{
2424
"cell_type": "code",
2525
"execution_count": null,
26-
"id": "89f33397",
26+
"id": "9ce7c0c5",
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
@@ -35,7 +35,7 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "7a01befa",
38+
"id": "88b07548",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [

content/components.ipynb

Lines changed: 0 additions & 27 deletions
This file was deleted.

content/conditional_default.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "e46ec9e8",
6+
"id": "5021c0e6",
77
"metadata": {},
88
"outputs": [],
99
"source": [
@@ -13,7 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": null,
16-
"id": "d4bc6a1f",
16+
"id": "b8d77448",
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -23,7 +23,7 @@
2323
{
2424
"cell_type": "code",
2525
"execution_count": null,
26-
"id": "25e7eb68",
26+
"id": "b130acb5",
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
@@ -35,7 +35,7 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "6820086a",
38+
"id": "01c68bde",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -47,7 +47,7 @@
4747
{
4848
"cell_type": "code",
4949
"execution_count": null,
50-
"id": "cbc747a0",
50+
"id": "16a8fba2",
5151
"metadata": {},
5252
"outputs": [],
5353
"source": [
@@ -59,7 +59,7 @@
5959
{
6060
"cell_type": "code",
6161
"execution_count": null,
62-
"id": "9461dc1c",
62+
"id": "0e8c89ee",
6363
"metadata": {},
6464
"outputs": [],
6565
"source": [

content/conditionals.ipynb

Lines changed: 0 additions & 27 deletions
This file was deleted.

content/dataclass_component.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "5d789b9f",
6+
"id": "089c39e6",
77
"metadata": {},
88
"outputs": [],
99
"source": [
@@ -13,7 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": null,
16-
"id": "006e1b15",
16+
"id": "96ffb6cf",
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -23,7 +23,7 @@
2323
{
2424
"cell_type": "code",
2525
"execution_count": null,
26-
"id": "f408ac5e",
26+
"id": "38318773",
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
@@ -33,7 +33,7 @@
3333
{
3434
"cell_type": "code",
3535
"execution_count": null,
36-
"id": "a3f47214",
36+
"id": "420c23ab",
3737
"metadata": {},
3838
"outputs": [],
3939
"source": [
@@ -51,13 +51,13 @@
5151
{
5252
"cell_type": "code",
5353
"execution_count": null,
54-
"id": "fbb09b3b",
54+
"id": "7b95e914",
5555
"metadata": {},
5656
"outputs": [],
5757
"source": [
5858
"def main():\n",
5959
" \"\"\"Render a template to a string.\"\"\"\n",
60-
" greeting = Greeting(name=\"viewdom\")\n",
60+
" greeting = Greeting(name=\"tdom\")\n",
6161
" # TODO Teach the constructor to make dataclass components\n",
6262
" result = html(t\"<div><{greeting} /></div>\")\n",
6363
" return result"

content/default_component.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "40245ff4",
6+
"id": "b4daf97a",
77
"metadata": {},
88
"outputs": [],
99
"source": [
@@ -13,7 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": null,
16-
"id": "08ef76bb",
16+
"id": "41fbff64",
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -23,7 +23,7 @@
2323
{
2424
"cell_type": "code",
2525
"execution_count": null,
26-
"id": "5721cc1a",
26+
"id": "480b38b5",
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
@@ -35,7 +35,7 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "09da7d75",
38+
"id": "a1ac0684",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -47,7 +47,7 @@
4747
{
4848
"cell_type": "code",
4949
"execution_count": null,
50-
"id": "b9ee4d74",
50+
"id": "cc90c2aa",
5151
"metadata": {},
5252
"outputs": [],
5353
"source": [
@@ -59,7 +59,7 @@
5959
{
6060
"cell_type": "code",
6161
"execution_count": null,
62-
"id": "b4e72f71",
62+
"id": "d3693d0b",
6363
"metadata": {},
6464
"outputs": [],
6565
"source": [

content/default_value.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "0ce34d6a",
6+
"id": "28fcb12d",
77
"metadata": {},
88
"outputs": [],
99
"source": [
@@ -13,7 +13,7 @@
1313
{
1414
"cell_type": "code",
1515
"execution_count": null,
16-
"id": "e957552f",
16+
"id": "7a458e3a",
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
@@ -23,19 +23,19 @@
2323
{
2424
"cell_type": "code",
2525
"execution_count": null,
26-
"id": "13db272c",
26+
"id": "9f640181",
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
30-
"def Hello(name=\"viewdom\"):\n",
30+
"def Hello(name=\"World\"):\n",
3131
" \"\"\"A simple hello component.\"\"\"\n",
3232
" return html(t\"<div>Hello {name}</div>\")"
3333
]
3434
},
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "a6e85f92",
38+
"id": "8cf8d313",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [

0 commit comments

Comments
 (0)