aboutsummaryrefslogtreecommitdiffstats
path: root/demo/templates/base.html.j2
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-05-02 23:38:23 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-05-02 23:38:23 +0300
commite17048eddfe2df86abd2d498da2a33b9c3dd8a72 (patch)
tree4e6799cdfb0e05c9df499bcf8ec4d33d8d5ec3fd /demo/templates/base.html.j2
parentef72b74ec34e95a38890d542cda298dd6565d5ad (diff)
Add sort_asc param, impl demo chat app
Diffstat (limited to 'demo/templates/base.html.j2')
-rw-r--r--demo/templates/base.html.j217
1 files changed, 14 insertions, 3 deletions
diff --git a/demo/templates/base.html.j2 b/demo/templates/base.html.j2
index 47b3f6c..06ab5fc 100644
--- a/demo/templates/base.html.j2
+++ b/demo/templates/base.html.j2
@@ -6,14 +6,25 @@
<link rel="preload" href="/static/InclusiveSans-Regular.ttf" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="stylesheet" href="/static/styles.css"></link>
{% block head_meta %}
- <title>Database browser</title>
- <meta name="description" content="Database browser for log_db">
+ <title>Demo chat app</title>
+ <meta name="description" content="Demo chat app">
{% endblock %}
</head>
<body>
- <h1><a href="/">Database browser</a></h1>
+ <h1><a href="/">Demo chat app</a></h1>
{% block content %}{% endblock %}
+ <form id="refresh" action="/" hidden method="get" htmp replace="messages">
+ <input id="refresh_hidden" type="hidden" name="nonce" value="">
+ </form>
+
<script src="/static/htmp.js"></script>
+ <script>
+ setInterval(() => {
+ console.log('refreshing');
+ document.getElementById('refresh_hidden').value = Date.now();
+ document.getElementById('refresh').submit();
+ }, 3000);
+ </script>
</body>
</html>