Files
jobboard/app/templates/base.html
T
WolfandClaude Fable 5.1 c4f2bcc0c9 Viewing as leads the Roles rail; settings get a rail, agent cards, one Sources section at a time
A search agent is a persona, and every like or pass belongs to the one
being viewed. The rail now opens on Viewing as: a full-width chooser,
the name alone with one agent, a note with none, remembered in the URL
and localStorage. The vote buttons, the reader's affinity control, the
feed, the tag counts and the reader fetch all carry that agent; before,
votes sent none and every one landed on the default agent. Best first
and Newest first are back as the segmented control under Order,
independent of the agent. The rail selects no longer clip descenders:
Chrome ignores line-height on a select, so the fixed box is gone in
favour of padding and a min-height.

Settings render inside a sticky rail (Search agents; Sources with Job
boards, Company boards, Runs, Messages; Account), a strip under the
header on a phone, so Runs is one click away however long the company
list gets. Sources shows one section at a time, chosen by the fragment,
so the old redirects still land. Search agents are cards, newest first:
name, an On/Off switch with its word, the intent in full, the weights,
Edit in place, New agent on top, and a link to Roles as that agent.
Switching one on rescores it.

replace_scores writes nothing for an agent deleted while score was
running, instead of failing the run on the foreign key.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 15:05:55 +02:00

75 lines
4.4 KiB
HTML

{# The frame every page is in. The top bar is `TABS` from app/web/pages.py
plus the cog, and the cog's pages are `SETTINGS` there, in the rail
settings/_rail.html draws: adding a page is one entry in one of those
lists, never a link here.
Three blocks let a page go past the default frame: `body_attrs` for
attributes on `<body>`, `header_tools` for controls between the brand and
the tabs (the Roles page's burger and search box), and `page` to replace
the centred `<main>` with a layout of its own (the Roles page's rail, feed
and reader, and the settings rail in settings/_layout.html). A page setting `active_path` lights the tab for that path
rather than its own, which is how `/roles/{uid}` keeps Roles lit. #}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>{% block title %}roledesk{% endblock %}</title>
{# Kept on the home screen rather than in a tab, as newsdesk is: `display:
standalone` in the manifest drops the browser's chrome, which is worth a
row of roles on a phone. `manifest.json` and not `.webmanifest`, because
StaticFiles guesses the content type from the extension and not every
machine knows the second one. Two `theme-color`s so the status bar is the
colour of the header right under it. No service worker: the app is no use
without the server. #}
<link rel="manifest" href="/static/manifest.json">
<link rel="icon" href="/static/icon.svg" type="image/svg+xml">
<link rel="icon" href="/static/icon-192.png" type="image/png" sizes="192x192">
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#1b2126" media="(prefers-color-scheme: dark)">
<meta name="mobile-web-app-capable" content="yes">
{# iOS reads neither the manifest nor the line above: standalone mode, the
home screen label and the status bar are still set from its own
`apple-` metas. #}
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="roledesk">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="stylesheet" href="{{ asset('app.css') }}">
</head>
<body{% block body_attrs %}{% endblock %}>
{% set here = active_path | default(request.url.path, true) %}
<header class="top">
<a class="brand" href="/">role<span>desk</span></a>
{% block header_tools %}{% endblock %}
<nav>
{% for tab in TABS %}
<a href="{{ tab.path }}"
{% if here == tab.path %}class="active" aria-current="page"{% endif %}>{{ tab.label }}</a>
{% endfor %}
{# health's cog: an icon because it is not a place you go to often, and a
word would take a third of the bar on a phone. #}
<a href="/settings" class="icon{% if request.url.path.startswith('/settings') %} active{% endif %}"
title="Settings" aria-label="Settings"><svg viewBox="0 0 24 24" width="17" height="17"
aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg></a>
</nav>
</header>
{% block page %}
<main>
{% block content %}{% endblock %}
</main>
{% endblock %}
{# toasts first, and the order is load-bearing: it owns `window.toast`, which
app.js calls on a failed fetch and live.js feeds server notices into, and
`window.esc`, which every page script below builds its HTML with. app.js
next, since every page script takes `api` and the shared helpers from it. #}
<script src="{{ asset('toasts.js') }}"></script>
<script src="{{ asset('app.js') }}"></script>
<script src="{{ asset('live.js') }}"></script>
{% block scripts %}{% endblock %}
</body>
</html>