Skip to content

Commit 684b2fd

Browse files
author
Jag Talon
committed
initial commit
1 parent 417f2d6 commit 684b2fd

File tree

3 files changed

+40
-5
lines changed

3 files changed

+40
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ dist-xdc
1010
.vscode/*
1111
.idea
1212
.DS_Store
13-
*~
13+
*~
14+
pnpm-lock.yaml

index.html

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,40 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<script src="webxdc.js"></script>
7+
<style>
8+
html, body {
9+
width: 100%;
10+
height: 100%;
11+
margin: 0;
12+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
13+
}
14+
15+
body {
16+
display: flex;
17+
}
18+
19+
header {
20+
width: 100%;
21+
height: fit-content;
22+
padding: 1rem;
23+
text-align: center;
24+
font-size: 1rem;
25+
font-weight: bold;
26+
}
27+
</style>
728
</head>
829
<body>
930
<script type="module">
10-
window.webxdc.sendUpdate({ payload: "hello world!" }, "");
31+
import { h, render } from 'preact';
32+
import htm from 'htm';
33+
34+
const html = htm.bind(h);
35+
36+
function App (props) {
37+
return html`<header>Split Bill</header>`;
38+
}
39+
40+
render(html`<${App} />`, document.body);
1141
</script>
1242
</body>
1343
</html>

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
"build": "vite build"
1010
},
1111
"devDependencies": {
12+
"@webxdc/vite-plugins": "latest",
13+
"@webxdc/webxdc-dev": "latest",
1214
"concurrently": "latest",
1315
"prettier": "latest",
14-
"vite": "latest",
15-
"@webxdc/webxdc-dev": "latest",
16-
"@webxdc/vite-plugins": "latest"
16+
"vite": "latest"
17+
},
18+
"dependencies": {
19+
"htm": "^3.1.1",
20+
"preact": "^10.25.3"
1721
}
1822
}

0 commit comments

Comments
 (0)