Spaces:
Running
Running
Add subtitle
Browse files- src/tutorial/__init__.py +5 -3
src/tutorial/__init__.py
CHANGED
|
@@ -11,6 +11,7 @@ from fasthtml.common import (
|
|
| 11 |
A,
|
| 12 |
Code,
|
| 13 |
Div,
|
|
|
|
| 14 |
HighlightJS,
|
| 15 |
Iframe,
|
| 16 |
Main,
|
|
@@ -40,7 +41,9 @@ examples = sorted([f.stem for f in Path(__file__).parent.glob("*.py") if f.stem
|
|
| 40 |
INTRO = """
|
| 41 |
# HTMX examples with FastHTML
|
| 42 |
|
| 43 |
-
Reproduction of HTMX official [examples](https://htmx.org/examples/)
|
|
|
|
|
|
|
| 44 |
"""
|
| 45 |
|
| 46 |
|
|
@@ -116,7 +119,7 @@ class Example:
|
|
| 116 |
content = Div(doc, cls="marked")
|
| 117 |
|
| 118 |
return Main(
|
| 119 |
-
H1(self.title),
|
| 120 |
Div(
|
| 121 |
A("Back", href="/"),
|
| 122 |
"|",
|
|
@@ -159,7 +162,6 @@ def code_block(module, obj):
|
|
| 159 |
|
| 160 |
|
| 161 |
def start():
|
| 162 |
-
print("hi")
|
| 163 |
serve("tutorial.__init__", app="get_app")
|
| 164 |
|
| 165 |
|
|
|
|
| 11 |
A,
|
| 12 |
Code,
|
| 13 |
Div,
|
| 14 |
+
Hgroup,
|
| 15 |
HighlightJS,
|
| 16 |
Iframe,
|
| 17 |
Main,
|
|
|
|
| 41 |
INTRO = """
|
| 42 |
# HTMX examples with FastHTML
|
| 43 |
|
| 44 |
+
Reproduction of HTMX official [examples](https://htmx.org/examples/) with Python [FastHTML](https://docs.fastht.ml/).
|
| 45 |
+
|
| 46 |
+
The code can be found on [GitHub](https://github.com/phihung/fasthtml_examples).
|
| 47 |
"""
|
| 48 |
|
| 49 |
|
|
|
|
| 119 |
content = Div(doc, cls="marked")
|
| 120 |
|
| 121 |
return Main(
|
| 122 |
+
Hgroup(H1(self.title), P(self.desc)),
|
| 123 |
Div(
|
| 124 |
A("Back", href="/"),
|
| 125 |
"|",
|
|
|
|
| 162 |
|
| 163 |
|
| 164 |
def start():
|
|
|
|
| 165 |
serve("tutorial.__init__", app="get_app")
|
| 166 |
|
| 167 |
|