Files
jobboard/app/templates/base.html
T
WolfandClaude Fable 5.1 3a240e51df Pull pipeline/ from boilerplate a80ad8a: cadence picker, queue badge, label refresh
The schedule cadence is a picker, the add row is behind a button and off
here, a running-jobs chip with Kill and Stop run sits in every header, and
a declared schedule's label is refreshed at startup.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 16:22:46 +02:00

80 lines
4.7 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 %}
{# The queue's chip, from the queue's own router like `<desk-jobs>`: grey
while idle, what is running and a popover with Kill otherwise, and a
link to the Runs section. Loaded here, once, for every page. #}
<script type="module" src="/_jobs/jobs.js"></script>
<desk-queue href="/settings/sources#runs"></desk-queue>
{# 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>