-
-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathindex.html
More file actions
48 lines (47 loc) · 1.48 KB
/
index.html
File metadata and controls
48 lines (47 loc) · 1.48 KB
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
<!doctype html>
<html lang="en">
<head>
<link
rel="icon"
href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">⛱️</text></svg>'
/>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>json-components · @thi.ng/umbrella</title>
<script>
window.goatcounter = { path: (p) => location.host + p };
</script>
<script
data-goatcounter="https://thing.goatcounter.com/count"
async
src="//gc.zgo.at/count.js"
></script>
</head>
<body>
<h1>JSON driven components</h1>
<p>
The components on the right are a direct mapping of the JSON data
below, using a mapping function from JSON to
<a
href="https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/json-components/src/index.ts"
>hiccup component format</a
>, which then is used to reactively mutate the DOM (total JS file
size: 12KB).
</p>
<p>
Edit fields, or copy & paste complete items to add more. Any edits
will be immediately reflected in both themed versions (provided
they're valid - no error checking!).
</p>
<div id="app"></div>
<footer>
Made with
<a
href="https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/hdom"
>@thi.ng/hdom</a
>.
</footer>
<script type="module" src="/src/index.ts"></script>
</body>
</html>