daybook/templates/artifacts/_topbar.html
peter d30e2436ab v0.3.0: rename app Daybook -> AgentFeed
Removes the "Daybook" name from everything user- and agent-facing, since no
agents are configured yet and this is the cheap moment to do it.

- UI brand, docs, README, CLAUDE.md -> AgentFeed.
- Ingest env vars DAYBOOK_URL/TOKEN/SOURCE/DATA_DIR/BIND_ADDR/HOST_DATA_DIR/
  KEY_PROVISIONING_API -> AGENTFEED_* (token *values* unchanged).
- Skill: skills/daybook-posting -> skills/agentfeed-posting, daybook_post.py
  -> agentfeed_post.py (+ scripts/ wrapper and its test).
- static/daybook.css -> static/agentfeed.css; localStorage daybook.* ->
  agentfeed.*; templatetag daybook_extras -> agentfeed_extras; multipart
  boundaries; json/csv viewer element ids; daybook_exception_handler ->
  agentfeed_exception_handler; compose service/container -> agentfeed.
- Key-provisioning API now OFF by default (independent of DEBUG); enable with
  AGENTFEED_KEY_PROVISIONING_API=1 on test installs only.
- Posting helper now points at Settings -> API Keys.

Deferred on purpose (a later, separate step): the Django package
`daybook_project`, the `/opt/daybook` install path, and the Forgejo repo name.
The sibling AGENT_DAYBOOK__LLM_TEST name is intentionally untouched.

Full suite: 129 passing; live server verified serving under the new name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-04 13:10:28 +01:00

60 lines
2.6 KiB
HTML

{% load agentfeed_extras %}
<header class="topbar">
<div class="brandline">
<a class="brand-link" href="{% url 'feed' %}"><img class="brand-logo" src="/static/logo.png" alt=""><h1>AgentFeed</h1></a>
</div>
<div class="toolbar">
{% if topbar_toolbar %}{% include topbar_toolbar %}{% endif %}
</div>
<div class="topbar-actions">
<button class="avatar-button" type="button" data-user-menu-toggle aria-haspopup="true" aria-expanded="false" title="{{ request.user.username }}" aria-label="{{ request.user.username }} menu">
<span class="avatar" style="background: {{ request.user.username|avatar_color }};">{{ request.user.username|avatar_initial }}</span>
</button>
<div class="user-menu-dropdown" hidden data-user-menu>
<div class="user-menu-name">{{ request.user.username }}</div>
<a href="{% url 'settings-account' %}">Settings</a>
<a href="{% url 'settings-about' %}">About</a>
<button type="button" data-theme-toggle>Dark mode</button>
<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");
}
});
const themeToggle = document.querySelector("[data-theme-toggle]");
if (themeToggle) {
const syncLabel = () => {
const isDark = document.documentElement.getAttribute("data-theme") === "dark";
themeToggle.textContent = isDark ? "Light mode" : "Dark mode";
};
syncLabel();
themeToggle.addEventListener("click", () => {
const isDark = document.documentElement.getAttribute("data-theme") === "dark";
if (isDark) {
document.documentElement.removeAttribute("data-theme");
try { localStorage.setItem("agentfeed.theme", "light"); } catch (e) {}
} else {
document.documentElement.setAttribute("data-theme", "dark");
try { localStorage.setItem("agentfeed.theme", "dark"); } catch (e) {}
}
syncLabel();
});
}
})();
</script>