Skip to content

Commit

Permalink
update ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
snopoke committed Sep 24, 2024
1 parent 8d09779 commit 04f8a1a
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,20 +211,9 @@ <h2>inline editing</h2>
<h2>New TODOs</h2>
<section>
<p><img src="images/shot-4.png"></p>
<pre>
index.html
<code data-trim><script type="text/template">
<button
hx-post="/new"
hx-target="#todo-list"
hx-swap="afterbegin">
<i class="fa-solid fa-plus"></i>
</button>
</script></code>
</pre>
</section>
<section>
<pre>
<pre class="fragment">
app.py
<code class="hljs python" data-trim><script type="text/template">
@app.route("/new")
Expand All @@ -234,6 +223,17 @@ <h2>New TODOs</h2>
return render_template("item.html", item=item)
</script></code>
</pre>
<pre class="fragment">
index.html
<code data-trim><script type="text/template">
<button
hx-post="/new"
hx-target="#todo-list"
hx-swap="afterbegin">
<i class="fa-solid fa-plus"></i>
</button>
</script></code>
</pre>
</section>
</section>
<section>
Expand Down Expand Up @@ -264,6 +264,18 @@ <h2>DONE</h2>
</code>
</pre>
</section>
<section>
<pre>
app.py
<code class="hljs python" data-trim><script type="text/template">
@app.route("/done/<int:item_id>", methods=["POST"])
def done_item(item_id):
item = get_item(item_id)
item["done"] = True
return render_template("item_done.html", item=item)
</script></code>
</pre>
</section>
<section>
<pre>
item.html
Expand All @@ -286,18 +298,6 @@ <h2>DONE</h2>
</script></code>
</pre>
</section>
<section>
<pre>
app.py
<code class="hljs python" data-trim><script type="text/template">
@app.route("/done/<int:item_id>", methods=["POST"])
def done_item(item_id):
item = get_item(item_id)
item["done"] = True
return render_template("item_done.html", item=item)
</script></code>
</pre>
</section>
<section>
<pre>
item_done.html
Expand Down Expand Up @@ -362,7 +362,9 @@ <h2>More HTMX</h2>
</section>
<section>
<h2>Alpine.Js</h2>
<p>Let's add some client side interactivity</p>
<p class="fragment">A minimal tool for composing behavior in HTML markup</p>
<p class="fragment">A collection of 15 attributes, 6 properties, and 2 methods.</p>
<p class="fragment">Let's add some client side interactivity</p>
</section>
<section>
<h2>Dynamic Form Elements</h2>
Expand Down

0 comments on commit 04f8a1a

Please sign in to comment.