htmx_mqtt/site/index.html

21 lines
717 B
HTML

<!DOCTYPE html>
2023-12-30 14:33:52 -07:00
<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 -->
2023-12-30 14:33:52 -07:00
<div hx-ext="ws" ws-connect="/ws">
<p id="test"></p>
2023-12-30 14:33:52 -07:00
</div>
</body>
</html>