Skip to content

Commit bf57d65

Browse files
committed
Update readme/examples for RC.6 fix #24
1 parent 03a7f91 commit bf57d65

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def index():
4343
return f"""
4444
<html>
4545
<head>
46-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
46+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js"></script>
4747
</head>
4848
<body {data.on_load("@get('/updates')")}>
4949
<span id="currentTime"></span><br>

examples/django/ds/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<head>
1919
<title>DATASTAR on Django (ASGI)</title>
2020
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
21-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
21+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js"></script>
2222
<style>
2323
html, body { height: 100%; width: 100%; }
2424
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }
@@ -30,7 +30,7 @@
3030
<div class="container">
3131
<div
3232
class="time"
33-
data-on-load="@get('/updates')"
33+
data-init="@get('/updates')"
3434
>
3535
Current time from element: <span id="currentTime">CURRENT_TIME</span>
3636
</div>
@@ -76,7 +76,7 @@ async def time_updates():
7676
<head>
7777
<title>DATASTAR on Django (WSGI)</title>
7878
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
79-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
79+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js"></script>
8080
<style>
8181
html, body { height: 100%; width: 100%; }
8282
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }
@@ -90,7 +90,7 @@ async def time_updates():
9090
<div class="container">
9191
<div
9292
class="time"
93-
data-on-load="@get('/updates-wsgi/')"
93+
data-init="@get('/updates-wsgi/')"
9494
>
9595
Current time from element: <span id="currentTime">CURRENT_TIME</span>
9696
</div>

examples/fastapi/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<head>
3131
<title>DATASTAR on FastAPI</title>
3232
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
33-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
33+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js"></script>
3434
<style>
3535
html, body { height: 100%; width: 100%; }
3636
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }
@@ -44,7 +44,7 @@
4444
<div class="container">
4545
<div
4646
class="time"
47-
data-on-load="@get('/updates')"
47+
data-init="@get('/updates')"
4848
>
4949
Current time from element: <span id="currentTime">CURRENT_TIME</span>
5050
</div>

examples/fasthtml/advanced.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
hdrs=(
4747
Script(
4848
type="module",
49-
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js",
49+
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js",
5050
),
5151
),
5252
)
@@ -136,7 +136,7 @@ def index():
136136
Label(fr="filter", data_attr_aria_busy="$filtering")("Filter Compound"),
137137
# Bind the 'filter' signal to the value of this input, debouncing using Datastar modifier
138138
Input(
139-
{"data-on-input__debounce.250ms": f"@post('{table}')"},
139+
{"data-on:input__debounce.250ms": f"@post('{table}')"},
140140
data_bind_filter=True,
141141
id="filter",
142142
name="filter",

examples/fasthtml/simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
hdrs=(
2424
Script(
2525
type="module",
26-
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js",
26+
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js",
2727
),
2828
),
2929
)

examples/litestar/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<head>
3030
<title>DATASTAR on Litestar</title>
3131
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
32-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
32+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js"></script>
3333
<style>
3434
html, body { height: 100%; width: 100%; }
3535
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }
@@ -43,7 +43,7 @@
4343
<div class="container">
4444
<div
4545
class="time"
46-
data-on-load="@get('/updates')"
46+
data-init="@get('/updates')"
4747
>
4848
Current time from element: <span id="currentTime">CURRENT_TIME</span>
4949
</div>

examples/quart/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<head>
2727
<title>DATASTAR on Quart</title>
2828
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
29-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
29+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js"></script>
3030
<style>
3131
html, body { height: 100%; width: 100%; }
3232
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }
@@ -40,7 +40,7 @@
4040
<div class="container">
4141
<div
4242
class="time"
43-
data-on-load="@get('/updates')"
43+
data-init="@get('/updates')"
4444
>
4545
Current time from element: <span id="currentTime">CURRENT_TIME</span>
4646
</div>

examples/sanic/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<head>
3030
<title>DATASTAR on Sanic</title>
3131
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
32-
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"></script>
32+
<script type="module" src="https://cdn.jsdelivr.net/gh/starfederation/datastar@v1.0.0-RC.6/bundles/datastar.js"></script>
3333
<style>
3434
html, body { height: 100%; width: 100%; }
3535
body { background-image: linear-gradient(to right bottom, oklch(0.424958 0.052808 253.972015), oklch(0.189627 0.038744 264.832977)); }
@@ -44,10 +44,10 @@
4444
<div
4545
id="timers"
4646
class="container"
47-
data-on-load="@get('/updates')"
47+
data-init="@get('/updates')"
4848
>
49-
<button data-on-click="@get('/add_element')">Add element timer</button>
50-
<button data-on-click="@get('/add_signal')">Add signal timer</button>
49+
<button data-on:click="@get('/add_element')">Add element timer</button>
50+
<button data-on:click="@get('/add_signal')">Add signal timer</button>
5151
<div class="time element">
5252
Current time from element: CURRENT_TIME
5353
</div>

0 commit comments

Comments
 (0)