2023-04-09 01:35:25 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en-US">
|
|
|
|
<head>
|
|
|
|
<title>StarKingdoms.TK</title>
|
|
|
|
<link rel="stylesheet" href="/static/css/stylemain.css"></link>
|
|
|
|
<link rel="favicon" href="/static/img/favicon.ico"></link>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="chatbox">
|
|
|
|
<div id="chats">
|
|
|
|
<p>hello: blsdkjf</p>
|
|
|
|
</div>
|
2023-04-09 15:25:42 +00:00
|
|
|
<input id="chat-value" type="text" placeholder="chat text goes here" />
|
2023-04-09 01:35:25 +00:00
|
|
|
<button id="chat-submit">submit</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script type="module">
|
|
|
|
// If you're getting build errors here | you need to run `just build_client_bundle` first, to compile client code
|
|
|
|
// v
|
2023-04-09 15:25:42 +00:00
|
|
|
import init, { rust_init, send_chat } from "./dist/client.js";
|
2023-04-09 01:35:25 +00:00
|
|
|
init().then(() => {
|
2023-04-09 15:25:42 +00:00
|
|
|
rust_init();
|
|
|
|
|
2023-04-09 01:35:25 +00:00
|
|
|
document.getElementById("chat-submit").addEventListener("click", e => {
|
2023-04-09 15:25:42 +00:00
|
|
|
send_chat(document.getElementById("chat-value").value);
|
2023-04-09 01:35:25 +00:00
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|