html-over-websockets-with-d.../app/website/templates/layouts/base.html
Andros Fenollosa 7f65835db7 Add page
2021-11-12 21:25:19 +01:00

51 lines
2.0 KiB
HTML

{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>htmx demo</title>
<link rel="icon" type="image/png" href="{% static "img/favicon.png" %}">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
<meta name="author" content="Andros Fenollosa">
<meta name="generator" content="Django">
<meta name="description" content="Demo WebSockets over HTML with htmx">
<meta property="og:type" content="website">
{# Styles #}
<link rel="stylesheet" type="text/css" href="{% static "css/normalize.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "css/pico.min.css" %}">
{# JavaScript #}
<script defer src="{% static "js/htmx.min.js" %}"></script>
</head>
<body>
<div class="container" hx-ws="connect:ws:{{ DOMAIN }}/ws/pages/{{ room_random }}/">
<header>
<nav>
<ul>
<li><strong>HTML over WebSockets with htmx</strong></li>
</ul>
<ul>
<li>
{# To page Talks #}
<form hx-ws="send">
<input type="hidden" name="action" value="page">
<input type="hidden" name="value" value="talks">
<a href="#" hx-ws="send" hx-trigger="click">Talks</a>
</form>
</li>
<li><a href="#">Profiles</a></li>
<li>
{# To page About #}
<form hx-ws="send">
<input type="hidden" name="action" value="page">
<input type="hidden" name="value" value="about">
<a href="#" hx-ws="send" hx-trigger="click">About</a>
</form>
</li>
</ul>
</nav>
</header>
<main id="main"></main>
</div>
</body>
</html>