This commit is contained in:
Andros Fenollosa 2024-03-19 17:09:00 +01:00
parent afd567fa46
commit ea21007d5e

10
one.org
View File

@ -427,7 +427,6 @@ For example, you can create a link to the ~blog single~ page with the ~slug~ of
#+BEGIN_SRC html
<a
data-controller="page"
data-action="click->page#changePage"
data-page="blog_single"
data-slug="{{ article.slug }}"
@ -820,6 +819,7 @@ Create a folder called ~templates~, or use your template folder, inside your App
<body
data-host="{{ request.get_host }}"
data-debug="{{ DEBUG }}"
data-controller="page"
>
<section id="loading"></section>
<section id="notifications" class="notifications"></section>
@ -849,9 +849,13 @@ Create a folder called ~pages~ in your template folder and inside it create a fi
{# my-app/templates/pages/home.html #}
{% load static %}
<main data-controller="home">
<main>
<p>
<button data-action="click->home#randomNumber">Random number</button>
<button
data-action="click->page#run"
data-liveview-action="home"
data-liveview-function="random_number"
>Generate random number</button>
</p>
<h2 id="output-random-number"></h2>
</main>