{%- set here = (nav_items | selectattr('0', 'equalto', page) | list | first) or ('home', '100', 'Index', '/') -%} {% block title %}P{{ here[1] }} Media Centre{% endblock %} {#- Space Mono is self-hosted (see base.css's @font-face) — this app runs on a LAN-only home server where a Google Fonts request can simply fail, and a dropped webfont request is a silent identity change, not a graceful fallback. -#} {% block css %}{% endblock %} {#- Skip-link: every page but the index now opens with a full nav block before any real content — a keyboard or screen-reader visitor would otherwise tab through all eight destinations on every single visit. Off-screen until focused, then it's the first thing tabbing into the page reaches. -#}
P{{ here[1] }} {{ here[2] }} {#- SABnzbd's queue, on every page — the same live /api/sabnzbd poll Activity and System already use, not a server-rendered fetch, so an unreachable SABnzbd never adds latency to a page that doesn't otherwise need it. Starts blank and fills in within a second. -#}
{#- Fastext: the four coloured keys. Each page names its own four, so the keys always point somewhere useful from where you are. On the index it stays the closing row, under Now Showing/Just Added, since the index's own body already is the full nav. Everywhere else it leads, right under the header, since it's the only nav those pages carry. -#} {% set fastext_nav %} {% endset %} {% if page != 'home' %}{{ fastext_nav }}{% endif %}
{% block content %}{% endblock %}
{% if page == 'home' %}{{ fastext_nav }}{% endif %} {% block js %}{% endblock %}