Add HTML and setup code.
This commit is contained in:
parent
e43d18a363
commit
26a9841557
|
@ -0,0 +1,12 @@
|
||||||
|
// Third-party imports.
|
||||||
|
import {Component} from "preact";
|
||||||
|
|
||||||
|
export class App extends Component {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<p class="subtitle">Today is:</p>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
<!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.0">
|
||||||
|
<title>Today</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script type="module" src="./setup.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,16 @@
|
||||||
|
// Third-party imports.
|
||||||
|
import {render} from "preact";
|
||||||
|
// CSS imports.
|
||||||
|
import "modern-normalize/modern-normalize.css";
|
||||||
|
import "./global.scss";
|
||||||
|
// First-party imports.
|
||||||
|
import {App} from "./app.js";
|
||||||
|
|
||||||
|
if ($dev) {
|
||||||
|
await import("./date/date.test.js");
|
||||||
|
}
|
||||||
|
|
||||||
|
const preactRoot = document.createElement("div");
|
||||||
|
preactRoot.classList.add("preact-root");
|
||||||
|
document.body.append(preactRoot);
|
||||||
|
render(<App />, preactRoot);
|
Loading…
Reference in New Issue