generated from ElnuDev/go-project
Rearrange repo as monorepo
This commit is contained in:
parent
2a59a96493
commit
848175efde
11 changed files with 216 additions and 172 deletions
36
cmd/shiritori/static/index.html
Normal file
36
cmd/shiritori/static/index.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Shiritori</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<script src="https://unpkg.com/htmx.org@1.9.3"></script>
|
||||
</head>
|
||||
<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"
|
||||
hx-swap="none"
|
||||
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"
|
||||
hx-sse="swap:players">
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in a new issue