feat: top-level nav and chat list view

This commit is contained in:
Joseph Doherty
2026-04-26 12:36:20 -04:00
parent fbb16c86b3
commit 0c08745194
14 changed files with 218 additions and 19 deletions
+1 -6
View File
@@ -8,11 +8,6 @@
<script src="https://unpkg.com/htmx.org@1.9.12" defer></script>
</head>
<body>
<header class="topbar">
<a class="brand" href="/bots">chat</a>
</header>
<main class="container">
{% block content %}{% endblock %}
</main>
{% block body %}{% endblock %}
</body>
</html>
+1 -1
View File
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "layout.html" %}
{% block title %}New bot - chat{% endblock %}
{% block content %}
<h1>New bot</h1>
+1 -1
View File
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "layout.html" %}
{% block title %}Bots - chat{% endblock %}
{% block content %}
<header class="page-header">
+26
View File
@@ -0,0 +1,26 @@
{% extends "layout.html" %}
{% block title %}Chats - chat{% endblock %}
{% block content %}
<header class="page-header">
<h1>Chats</h1>
<a class="btn" href="/bots/new">+ New bot</a>
</header>
{% if chats %}
<ul class="chat-list">
{% for chat in chats %}
<li class="chat-row">
<a href="/chats/{{ chat.id }}">
<div class="chat-row-name">{{ chat.host_bot_name }}</div>
<div class="chat-row-snippet muted">{{ chat.last_message_snippet or '—' }}</div>
<div class="chat-row-meta muted">
<span>{{ chat.time }}</span>
{% if chat.last_played_at %}<span>· {{ chat.last_played_at }}</span>{% endif %}
</div>
</a>
</li>
{% endfor %}
</ul>
{% else %}
<p class="muted">No chats yet. <a href="/bots/new">Create a bot</a> to start.</p>
{% endif %}
{% endblock %}
+1 -1
View File
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "layout.html" %}
{% block title %}Confirm kickoff - chat{% endblock %}
{% block content %}
<h1>Confirm kickoff</h1>
+14
View File
@@ -0,0 +1,14 @@
{% extends "base.html" %}
{% block body %}
<nav class="rail">
<a class="rail-brand" href="/chats">chat</a>
<ul>
<li><a href="/chats" class="{% if active_nav == 'chats' %}active{% endif %}">Chats</a></li>
<li><a href="/bots" class="{% if active_nav == 'bots' %}active{% endif %}">Bots</a></li>
<li><a href="/settings" class="{% if active_nav == 'settings' %}active{% endif %}">Settings</a></li>
</ul>
</nav>
<main class="content">
{% block content %}{% endblock %}
</main>
{% endblock %}
+1 -1
View File
@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "layout.html" %}
{% block title %}Settings - chat{% endblock %}
{% block content %}
<h1>Settings</h1>