htmx_mqtt/site/index.html

21 lines
717 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>HTMX MQTT Test Page</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="style.css" rel="stylesheet">
<script src="https://unpkg.com/htmx.org"></script>
<script src="https://unpkg.com/htmx.org/dist/ext/ws.js"></script>
</head>
<body>
<h1>Test Page</h1>
<!-- Use "<p id=\"test\">test_0</br></p>" as the websocket message to replace the "test" element -->
<!-- Alternatively do "<p hx-swap-oob=\"beforeend:#test\">test_0</br></p>" to add it to the end of the "test" element -->
<div hx-ext="ws" ws-connect="/ws">
<p id="test"></p>
</div>
</body>
</html>