95 lines
3.0 KiB
Plaintext
95 lines
3.0 KiB
Plaintext
<!doctype html>
|
|
<html class="no-js" lang="">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
|
<title>Untitled!!!</title>
|
|
<meta name="description" content="" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<script
|
|
src="https://unpkg.com/htmx.org@1.9.6"
|
|
integrity="sha384-FhXw7b6AlE/jyjlZH5iHa/tTe9EpJ1Y55RjcgPbjeWMskSxZt1v9qkxLJWNJaGni"
|
|
crossorigin="anonymous"
|
|
></script>
|
|
<link
|
|
rel="stylesheet"
|
|
href="/static/out.css"
|
|
type="text/css"
|
|
media="screen"
|
|
/>
|
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
<!-- Place favicon.ico in the root directory -->
|
|
</head>
|
|
<body class="bg-main-700/25 text-xl">
|
|
<!--[if lt IE 8]>
|
|
<p class="browserupgrade">
|
|
You are using an <strong>outdated</strong> browser. Please
|
|
<a href="http://browsehappy.com/">upgrade your browser</a> to improve
|
|
your experience.
|
|
</p>
|
|
<![endif]-->
|
|
<main class="grid grid-rows-[auto,1fr] h-screen">
|
|
<header>
|
|
<h1>Some Automoderation: login page</h1>
|
|
</header>
|
|
<section class="h-full grid place-content-center">
|
|
<form
|
|
id="loginForm"
|
|
class="grid grid-cols-2 place-content-center border border-black rounded p-4 gap-6"
|
|
>
|
|
<div id="roomInput" class="flex flex-col gap-4">
|
|
<p>Please specify room</p>
|
|
<input
|
|
id="roomName"
|
|
type="text"
|
|
name="roomName"
|
|
value=""
|
|
placeholder="room name!!!"
|
|
hx-trigger="keyup changed delay:500ms"
|
|
hx-post="/login/room-name-check"
|
|
hx-target="#formButton"
|
|
hx-swap="outerHTML"
|
|
/>
|
|
<input
|
|
id="roomPassword"
|
|
type="password"
|
|
name="roomPassword"
|
|
value=""
|
|
placeholder="room password"
|
|
/>
|
|
</div>
|
|
<div id="personInput" class="flex flex-col gap-4">
|
|
<p>And input your personal</p>
|
|
<input
|
|
id="personalName"
|
|
type="text"
|
|
name="personalName"
|
|
value=""
|
|
placeholder="personal name"
|
|
/>
|
|
<input
|
|
id="personalPassword"
|
|
type="password"
|
|
name="personalPassword"
|
|
value=""
|
|
placeholder="personal password"
|
|
/>
|
|
</div>
|
|
{{ block "formButton" .IsRoomExisting }}
|
|
{{ if not . }}
|
|
<button id="formButton" class="col-span-full" hx-post="/login/create">Create Room</button>
|
|
{{ else }}
|
|
<button id="formButton" class="col-span-full" hx-post="/login/join">Join Room</button>
|
|
{{ end }}
|
|
{{ end }}
|
|
</form>
|
|
<script>
|
|
window.addEventListener('DOMContentLoaded', (event) => {
|
|
document.getElementById('loginForm').reset();
|
|
});
|
|
</script>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|