-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shahrul
committed
Oct 11, 2024
1 parent
55b6e49
commit e8193f5
Showing
6 changed files
with
95 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
local module = {} | ||
local toggleMain = "toggleMain" | ||
local todoList = "todoList" | ||
local todoFooter = "todoFooter" | ||
|
||
function module.Page(todos) | ||
return <html lang="en" data-framework="htmx"> | ||
<head> | ||
<meta charSet="utf-8" /> | ||
<title>HTMX • TodoMVC</title> | ||
<link rel="stylesheet" href="https://unpkg.com/todomvc-common@1.0.5/base.css" type="text/css" /> | ||
<link rel="stylesheet" href="https://unpkg.com/todomvc-app-css/index.css" type="text/css" /> | ||
<script type="text/hyperscript" src="/hs/start-me-up._hs"></script> | ||
<script type="text/hyperscript" src="/hs/main._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/toggle-main._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/toggle-footer._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/toggle-show._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/add-todo._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/footer._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/toggle-all._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/clear-completed._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/destroy._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/todo-count._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/todo-dblclick._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/todo-check._hs"></script> | ||
<script type="text/hyperscript" src="/hs/behaviors/todo-edit._hs"></script> | ||
</head> | ||
<body> | ||
<section class="todoapp" | ||
_="install ToggleMain end install ToggleFooter end install ToggleShow end" | ||
> | ||
<header class="header"> | ||
<h1>todos</h1> | ||
<input | ||
id="add-todo" | ||
name="title" | ||
class="new-todo" | ||
placeholder="What needs to be done?" | ||
_="install AddTodo" | ||
/> | ||
</header> | ||
{toggleMain} | ||
{todoList} | ||
{todoFooter} | ||
</section> | ||
<footer class="info" | ||
_="on load debounced at 10ms call startMeUp() hashCache()" | ||
> | ||
<p>Double-click to edit a todo</p> | ||
<p>Created by <a href="http://github.com/syarul/">syarul</a></p> | ||
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p> | ||
<img src="https://htmx.org/img/createdwith.jpeg" width="250" height="auto" /> | ||
</footer> | ||
</body> | ||
<script src="https://unpkg.com/todomvc-common@1.0.5/base.js"></script> | ||
<script src="https://unpkg.com/htmx.org@1.9.10"></script> | ||
<script src="https://unpkg.com/hyperscript.org/dist/_hyperscript.js"></script> | ||
</html> | ||
end | ||
|
||
return module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
return <html lang="en" data-framework="htmx"> | ||
<head> | ||
<title>HTMX • TodoMVC</title> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
return <p>Created by <a href="http://github.com/syarul/">syarul</a></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters