26 lines
1 KiB
HTML
26 lines
1 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}WebSocket{% endblock %}
|
|
{% block content %}
|
|
<h1 id="title"
|
|
class="inline-block px-4 pb-0 mx-auto mb-0 text-center text-6xl sm:text-8xl font-thin text-transparent bg-clip-text bg-gradient-to-r from-terminal-600 via-terminal-500 to-terminal-900 ring-red-700 text-shadow-xl text-shadow-zinc-950 ring-5 leading-none">
|
|
HTMX PATTERNS - WEBSOCKET
|
|
</h1>
|
|
<button
|
|
class="text-3xl my-24 px-8 py-2 rounded rounded-xl bg-terminal-950 hover:bg-terminal-900 hover:text-terminal-400 text-terminal-500 shadow-lg shadow-terminal-300/20 hover:shadow-terminal-300/30 ring-terminal-300"
|
|
hx-post="{{ url_for('post_toast') }}"
|
|
hx-target="#toast"
|
|
hx-swap="beforeend"
|
|
>
|
|
Submit
|
|
</button>
|
|
<div hx-ext="ws" ws-connect="/websocket/">
|
|
<div id="notifications"></div>
|
|
<div id="chat_room">
|
|
...
|
|
</div>
|
|
<form id="form" ws-send>
|
|
<input name="chat_message" class='text-black'>
|
|
</form>
|
|
</div>
|
|
|
|
{% endblock %}
|