generated from ElnuDev/go-project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
2 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>Shiritori</title>
|
||
2 years ago
|
<link rel="stylesheet" href="style.css">
|
||
2 years ago
|
<script src="https://unpkg.com/htmx.org@1.9.3"></script>
|
||
|
</head>
|
||
2 years ago
|
<body hx-sse="connect:/api/events">
|
||
|
<div id="content">
|
||
|
<div id="split">
|
||
|
<div>
|
||
|
<div id="shiritori"
|
||
|
hx-sse="swap:word"
|
||
|
hx-swap="beforeend"
|
||
|
hx-on::sse-message="this.scrollTop = this.scrollHeight">
|
||
|
</div>
|
||
|
<form
|
||
|
hx-post="/api/submit"
|
||
2 years ago
|
hx-swap="none"
|
||
2 years ago
|
hx-on::after-request="this.querySelector('input[name=word]').value = ''">
|
||
|
<input id="shiritori-input" type="text" name="word">
|
||
|
</form>
|
||
|
</div>
|
||
|
<iframe
|
||
|
hx-sse="swap:navigate"
|
||
|
hx-on::sse-message="this.src = event.detail.data">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
<p id="shiritori-players"
|
||
2 years ago
|
hx-sse="swap:players">
|
||
|
</p>
|
||
2 years ago
|
</div>
|
||
2 years ago
|
</body>
|
||
|
</html>
|