2022-12-10 10:27:23 -05:00
|
|
|
import React from "react";
|
|
|
|
import {html} from "htm";
|
2022-12-04 16:19:22 -05:00
|
|
|
import * as TW from "./twind.js";
|
2022-12-03 19:05:26 -05:00
|
|
|
import * as UI from "./ui.js";
|
2022-12-05 23:22:37 -05:00
|
|
|
import * as Store from "./store.js";
|
2022-12-03 19:05:26 -05:00
|
|
|
|
2022-12-10 11:57:45 -05:00
|
|
|
// @ts-ignore:
|
2022-12-04 16:19:22 -05:00
|
|
|
const ShadowDOM = document.querySelector("#app").attachShadow({mode: "open"});
|
|
|
|
const ShadowDiv = document.createElement("div");
|
|
|
|
const ShadowCSS = document.createElement("style");
|
|
|
|
ShadowDOM.append(ShadowCSS);
|
|
|
|
ShadowDOM.append(ShadowDiv);
|
|
|
|
|
|
|
|
TW.Init(ShadowCSS, ShadowDiv);
|
|
|
|
|
2022-12-03 19:05:26 -05:00
|
|
|
React.render(html`
|
2022-12-05 23:22:37 -05:00
|
|
|
<${Store.Provider}>
|
2023-07-09 21:00:48 -04:00
|
|
|
<div class="max-w-[1170px] mx-auto font-sans">
|
2023-06-03 11:38:52 -04:00
|
|
|
|
2023-06-04 13:44:28 -04:00
|
|
|
<${UI.Header}/>
|
2022-12-11 22:57:07 -05:00
|
|
|
|
2023-07-09 21:00:48 -04:00
|
|
|
<div class="flex flex-col items-start lg:flex-row mt-4 mb-24">
|
2023-06-04 13:44:28 -04:00
|
|
|
<${UI.Controls}/>
|
2023-06-03 11:38:52 -04:00
|
|
|
<${UI.Chart}>
|
|
|
|
<${UI.Audiogram}/>
|
2023-07-09 21:00:48 -04:00
|
|
|
<div class="absolute left-0 w-full top-full md:(w-[300px] left-auto top-auto -right-[10px] -bottom-[10px])">
|
|
|
|
<${UI.Display}/>
|
|
|
|
</div>
|
2023-06-03 11:38:52 -04:00
|
|
|
<//>
|
2023-07-09 21:00:48 -04:00
|
|
|
|
2022-12-11 22:57:07 -05:00
|
|
|
</div>
|
2023-06-04 13:44:28 -04:00
|
|
|
|
|
|
|
</div>
|
2022-11-27 16:57:06 -05:00
|
|
|
<//>
|
2022-11-25 15:51:27 -05:00
|
|
|
`, ShadowDiv);
|