feat: SSE bs into room
This commit is contained in:
45
routes/templates/room.gohtml
Normal file
45
routes/templates/room.gohtml
Normal file
@@ -0,0 +1,45 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||||
<title>Room {{ .RoomName }} : Some Automoderation</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="h-screen">
|
||||
<!--[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]-->
|
||||
<div class="h-full w-full grid">
|
||||
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
|
||||
<div id="state-receival" class="bg-blue-300"
|
||||
hx-ext="sse" sse-connect="/rooms/random">
|
||||
<div> yoyo </div>
|
||||
<div sse-swap="message"> qweopop </div>
|
||||
</div>
|
||||
<div id="controls" class="bg-green-300">
|
||||
koko
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user