{# SPDX-License-Identifier: Apache-2.0 Copyright (c) 2026 evoila Group The shared page frame (P2.4). The document skeleton the three apps extend, with named slots for the parts that differ. Usage: {% extends "_page_frame.html" %} {% block page_title %}Runs{% endblock %} {% block content %}…{% endblock %} It owns , and , and nothing else. The navigation, the chrome and the asset links stay with the app: meho's side menu is meho's, and an app that cannot override its own cannot ship. ## The slots, and why there are six and not four P2.4 names four — title, page header, content, page scripts. Building against meho showed four is not enough, and the missing one is not a convenience. page_title the . head_scripts scripts that MUST run before the asset bundle. head_assets the app's stylesheet and vendor bundle links. page_header the top region: top bar, breadcrumbs, page heading. content the main pane. page_scripts scripts at the end of <body>. **`head_scripts` is the load-bearing one.** meho's `base.html` carries this constraint today, documented against incident #1692: Every script in <head> is `defer`red, and deferred scripts execute in document order. The vendored Alpine bundle auto-starts via `queueMicrotask(() => Alpine.start())` at the end of its own script task, and that microtask drains *before* the next deferred script runs. So a script that registers a component on `alpine:init` from the end of <body> is too late — the event has already fired, the `Alpine.data()` registration never happens, and its `x-data` element is dead. A frame offering only `page_scripts` would put every such registration after the bundle. The page still renders, the screenshot still matches, and the component silently does nothing. That is the worst shape of bug this phase can produce, so the frame has a slot that makes the ordering expressible. `head_scripts` comes before `head_assets` in the document. That order is the contract, not a detail. ## What the frame does not decide `data-theme` is set here because every page needs it and forgetting it on one page is how a surface reverts to a fallback palette. Its *value* comes from the app, defaulting to the evoila theme. Nothing else in this file is app-specific. It links no stylesheet, names no product and carries no navigation. #} <!doctype html> <html lang="{% block html_lang %}en{% endblock %}" data-theme="{% block theme %}evoila{% endblock %}" class="{% block html_class %}h-full{% endblock %}"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>{% block page_title %}MEHO{% endblock %} {#- Scripts that must evaluate before the asset bundle. See the note at the top of this file: a registration that lands after the bundle is lost, and nothing about the page looks wrong. -#} {% block head_scripts %}{% endblock %} {#- The app's own stylesheets and vendor bundles. The frame links none itself: the three apps do not agree on what they load, and a frame that picks for them is a frame none of them can use. -#} {% block head_assets %}{% endblock %} {% block head_extra %}{% endblock %} {#- `body_attrs` exists because a class is not the only thing an app needs on . meho carries `data-meho-tenant` there: the tenant the page was built for, which `page-tenant.js` reads from `body.dataset.mehoTenant` and sends with every request, so a request from a tab left open across a tenant switch is refused rather than answered against the wrong tenant. It is conditional — absent when there is no tenant — so it cannot be folded into a class. -#} {% block page_header %}{% endblock %} {% block content %}{% endblock %} {#- End of body. Plain page scripts and vendor bundles belong here, so they do not delay the bundle above. Anything registering on `alpine:init` belongs in `head_scripts` instead — from here it runs after Alpine has started and the registration is lost. -#} {% block page_scripts %}{% endblock %}