Daybook: a self-hosted, multi-user Django + DRF app where agents, scripts, or people publish artifacts and each logged-in user browses their own time-ordered, label-filterable feed. This squashes prior local development history (kept privately on a separate branch) into a single clean starting point for the public repository. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
37 lines
1.4 KiB
HTML
37 lines
1.4 KiB
HTML
<header class="topbar">
|
|
<div class="brandline">
|
|
<a class="brand-link" href="{% url 'feed' %}"><h1>AgentFeed</h1></a>
|
|
</div>
|
|
<div class="toolbar">
|
|
{% if topbar_toolbar %}{% include topbar_toolbar %}{% endif %}
|
|
</div>
|
|
<div class="topbar-actions">
|
|
<button class="icon-button" type="button" data-user-menu-toggle aria-haspopup="true" aria-expanded="false" title="{{ request.user.username }}">
|
|
⚙ {{ request.user.username }}
|
|
</button>
|
|
<div class="user-menu-dropdown" hidden data-user-menu>
|
|
<a href="{% url 'settings-account' %}">Settings</a>
|
|
<a href="{% url 'settings-demo-data' %}">Demo Data</a>
|
|
<form method="post" action="{% url 'logout' %}">{% csrf_token %}<button type="submit">Log out</button></form>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<script>
|
|
(() => {
|
|
const toggle = document.querySelector("[data-user-menu-toggle]");
|
|
const menu = document.querySelector("[data-user-menu]");
|
|
if (!toggle || !menu) return;
|
|
toggle.addEventListener("click", (event) => {
|
|
event.stopPropagation();
|
|
const isHidden = menu.hidden;
|
|
menu.hidden = !isHidden;
|
|
toggle.setAttribute("aria-expanded", String(isHidden));
|
|
});
|
|
document.addEventListener("click", (event) => {
|
|
if (!menu.hidden && !menu.contains(event.target) && event.target !== toggle) {
|
|
menu.hidden = true;
|
|
toggle.setAttribute("aria-expanded", "false");
|
|
}
|
|
});
|
|
})();
|
|
</script>
|