{# The signed-out shell (web-server-guide § The site). The auth service's pages are standalone public documents on their own routes (/login, /register, /reset, /forgot) — but they are not a separate *place*: they render the content service's own base.html, so the header, the panes, the footer and the stylesheet are the ones the signed-in visitor will keep seeing. That is the whole of "one layout, pre and post auth". The split: the left pane is the start page (_home.html, the same partial the content service renders — inert, because `subject` is undefined here), and the right pane holds the dialogue, standing exactly where the terminal will. A page fills `dialogue`. `error` / `notice` are rendered here for all of them, so no page repeats the flash markup. Both templates resolve through the auth service's ChoiceLoader (web/templates first, then web/site/templates) — see auth/app.py. #}{%extends"base.html"%}{# Signed out: no htmx, no MathJax. Nothing swaps and nothing carries TeX, and a login box has no business pulling a megabyte of typesetter. Signed in (a /terms or /password deep link): the full shell, because the header above is then live — and a header whose links reload the document would tear down the terminal beside it, which is the one thing the shell must not lose. #}{%blockshell_assets%}{%ifsubject%}{{super()}}{%endif%}{%endblock%}{# The terms link carries the page it was followed from (?back=, query and all). This tier has no htmx: the footer NAVIGATES, so /terms replaces the document and there is no pane history to come back through — and no Referer to read either. Being told is the only way the terms page can know where to return the reader, and the query matters: a half-finished registration would otherwise lose the token in its URL and have to be re-invited (pages.py § back). #}{%blockfooter_terms%}<ahref="/terms?back={{request.path_qs|urlencode}}">terms of use</a>{%endblock%}{# On a narrow screen the dialogue is the page, so it is the pane that shows (base.html § body_class). Signed in, the shell's own layout: content over terminal. #}{%blockbody_class%}{%ifnotsubject%}is-dialogue{%endif%}{%endblock%}{%blockcontent%}{%include"_home.html"%}{%endblock%}{%blockws_label%}{%ifsubject%}solver terminal{%else%}sign in{%endif%}{%endblock%}{%blockws%}{%ifsubject%}{# Signed in and still on an auth route — /terms and /password are reachable that way (deep links, no-JS). The right pane is theirs: the terminal, exactly as the content shell would give it. The iframe's /terminal is routed by Caddy to their own instance, so it attaches as usual. #}{{super()}}{%else%}<divclass="auth-pane"><divclass="auth-card">{%iferror%}<pclass="flash flash-error"role="alert">{{error}}</p>{%endif%}{%ifnotice%}<pclass="flash flash-notice"role="status">{{notice}}</p>{%endif%}{%blockdialogue%}{%endblock%}</div></div>{%endif%}{%endblock%}