rename to datastar-ep-1 and cp datastar-ep-2
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<li id="new-todo-row">
|
||||
<form data-on-submit="@post('/todo')">
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
data-bind-newtodo
|
||||
placeholder="Nueva tarea..."
|
||||
autofocus
|
||||
/>
|
||||
<button type="submit">enviar</button>
|
||||
</form>
|
||||
</li>
|
||||
@@ -1,15 +0,0 @@
|
||||
<li id="todo-{{ .ID }}">
|
||||
<button
|
||||
{{
|
||||
if
|
||||
.Completed
|
||||
}}
|
||||
disabled
|
||||
{{
|
||||
end
|
||||
}}
|
||||
data-on-click="@patch('/todo/{{.ID}}/completed')"
|
||||
>
|
||||
{{ .ID }} {{ .Name }} - {{ .Completed }}
|
||||
</button>
|
||||
</li>
|
||||
@@ -1,9 +0,0 @@
|
||||
<div id="todo-container">
|
||||
<h2>Listado de tareas</h2>
|
||||
|
||||
<button data-on-click="@get('/todo/new')">Nueva tarea</button>
|
||||
|
||||
<ol id="todo-list-body">
|
||||
{{ range .TodoList }} {{ template "fragments/todo-row" . }} {{ end }}
|
||||
</ol>
|
||||
</div>
|
||||
@@ -1,15 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Lista de tareas</title>
|
||||
<script
|
||||
type="module"
|
||||
src="https://cdn.jsdelivr.net/gh/starfederation/datastar@main/bundles/datastar.js"
|
||||
></script>
|
||||
</head>
|
||||
<body>
|
||||
<div data-on-load="@get('/todo')" id="todo-container">Cargando...</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user