-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
102 lines (102 loc) · 3.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The Merlin JS framework</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
</head>
<body>
<nav>
<template each:="api"><a href:="href" text:="label"></a> | </template>
<a href="https://github.com/marcodpt/merlin">GitHub</a>
</nav>
<main>
<h1>The Merlin JS framework</h1>
<a href="#/wrong/route">Not Found route sample</a>
</main>
<template id="view-counter">
<h1>Counter: <span text:></span></h1>
<button onclick="dec">-</button>
<button onclick="inc">+</button>
</template>
<template id="comp-counter">
<h1>Counter: <span text:="value"></span></h1>
<button onclick="dec" data-key:="key">-</button>
<button onclick="inc" data-key:="key">+</button>
</template>
<template id="view-counters">
<h1>Components sample</h1>
<comp-counter each:="" bind:=""></comp-counter>
</template>
<template id="view-todo">
<h1>To do list</h1>
<input type="text" value:="value" oninput="NewValue">
<ul>
<li each:="todos" text:></li>
</ul>
<button onclick="AddTodo">New!</button>
</template>
<template id="view-clock">
<h1>Clock</h1>
<h2 text:>Loading...</h2>
</template>
<template id="view-stopwatch">
<h1>Stopwatch</h1>
<h2 text:>Loading...</h2>
<button onclick="start">Start</button>
<button onclick="stop">Stop</button>
<button onclick="reset">Reset</button>
</template>
<template id="view-table">
<table>
<thead>
<tr>
<td></td>
<td text:="count"></td>
<td></td>
<td text:="avg_age"></td>
<td text:="sum_balance"></td>
</tr>
<tr>
<th>Delete</th>
<th>
<a href="javascript:;" onclick="sort_id">Id</a>
</th>
<th>
<a href="javascript:;" onclick="sort_name">Name</a>
</th>
<th>
<a href="javascript:;" onclick="sort_age">Age</a>
</th>
<th>
<a href="javascript:;" onclick="sort_balance">Balance ($)</a>
</th>
</tr>
</thead>
<tbody>
<tr each:="rows">
<td>
<a
href="javascript:;"
onclick="delete"
data-id:="id"
>Delete</a>
</td>
<td text:="id"></td>
<td text:="name"></td>
<td text:="age"></td>
<td text:="balance"></td>
</tr>
</tbody>
</table>
</template>
<template id="view-notfound">
<h1>404 Page not found</h1>
<a href="#/">Go Home</a>
</template>
<script type="module" src="samples/app.js"></script>
</body>
</html>