macgregor/src/index.html

40 lines
1.2 KiB
HTML
Raw Normal View History

<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>MacGregor House</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
2025-02-09 00:41:36 -05:00
href="https://fonts.googleapis.com/css2?family=Imbue:opsz,wght@10..100,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"
rel="stylesheet"
/>
</head>
<body>
<div id="app"></div>
<script src="../compiled/Main.js"></script>
<script>
var app = Elm.Main.init({
node: document.getElementById("app"),
flags: [window.innerWidth, window.innerHeight],
});
2025-02-09 00:41:36 -05:00
app.ports.copyToClipboard.subscribe((text) => {
var textArea = document.createElement("textarea");
textArea.value = text;
document.body.appendChild(textArea);
textArea.select();
document.execCommand("copy");
document.body.removeChild(textArea);
});
2025-02-10 01:56:10 -05:00
app.ports.scrollTo.subscribe((id) => {
let element = document.getElementById(id);
if (element) {
element.scrollIntoView({ behavior: "smooth" });
}
});
</script>
</body>
</html>