Compare commits

...

7 commits

Author SHA1 Message Date
trans_soup
10a60114b1 Merge branch 'dev' 2023-07-16 16:43:48 +02:00
trans_soup
690cd76d85 Merge branch 'dev' 2023-07-16 16:01:49 +02:00
trans_soup
ac75e69f53 Merge branch 'dev' 2023-07-16 15:42:13 +02:00
trans_soup
1da88ebae2 Merge branch 'dev' 2023-07-16 15:23:06 +02:00
trans_soup
58f2997449 Merge branch 'dev' 2023-07-16 15:16:13 +02:00
trans_soup
53fd5eccca Merge branch 'main' into export 2023-07-16 15:02:37 +02:00
trans_soup
9eca9236ea remove everything except js code to be exported. 2023-07-15 22:10:36 +02:00
4 changed files with 0 additions and 61 deletions

View file

@ -1,16 +0,0 @@
html, body {
margin: 0;
min-height: 100vh;
overflow: auto;
}
body {
background-color: #000;
color: #fff;
padding: 0;
}
a {
color: #0f0;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

View file

@ -1,13 +0,0 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="/assets/styles/base.css">
<title>json as html</title>
<script defer type="module" src="./src/demo.mjs"></script>
</head>
<body></body>

View file

@ -1,32 +0,0 @@
import { json_as_html } from "./core.mjs";
const demo = [
"div",
[
["id", "wrapper"],
["class", "demo_div"],
],
[
["h1", [], "header :)"],
["p", [], "paragraph! meow"],
["p", [], "another paragraph!! this is so cool"],
state => ["button", [
["onclick", _ => {
state.set("clicked", true);
render();
}]
], "it can even do buttons!"],
state => ["p", [], state.get("clicked") ? "clicked" : "not clicked"],
],
];
const state = new Map();
function render () {
document.body.innerHTML = "";
document.body.appendChild(json_as_html(demo, state));
}
render();