{% load static %}{% comment %} Writer's leaf header — THE one app header: the shared AppHeader primitive (`data-stx-app-header` mount, scitex_sdk/ui/css/app/app-header.css linked below). The leaf owns only identity values (title + live version) and the project-picker include; the SDK renders the row, so a user sees the same header in every app and the phone rules have one place to change. Included by editor.html (standalone) and available to a host that mounts this app, INSTEAD OF a bare `writer/_project_picker.html` include: one header, one title, one version, one picker, whichever side renders it. Contract, so a host does not have to know writer's internals: * identity — `Writer` (manifest `label`) + the LEAF package version, never the host's own version. This is a writer header that a host sheds light on, not a host header a writer writes into. * picker — `.stx-app-header__slot--project-selector`, between identity and actions, exactly as scitex-ui specifies. The slot renders the leaf picker ONLY when the host registered the `scitex_project_picker` tag library (see `views._project_picker_available`), because `{% load %}`ing a library that is not installed is a hard TemplateSyntaxError: standalone `scitex-writer gui` serves no projects. * actions — `.stx-app-header__actions`, EMPTY on purpose. Writer's app actions (Compile / Save / Log) live in the editor's own toolbar, which already knows their state; a second set here would be a second source of truth for the same buttons. Set `app_header_rendered=True` in the template context when a host renders its own header and includes this one: editor.html then skips it and the page keeps exactly one header. The title is `SciTeX Writer` (manifest `label`), matching the Scholar / FigRecipe shape (` + <version>`), never the bare `Writer`. {% endcomment %} <link rel="stylesheet" href="{% static 'scitex_sdk/ui/css/app/app-header.css' %}"> {# Shared AppHeader primitive (data-stx-app-header mount) — replaces the #} {# hand-rolled row above. Same slots, same picker, same version; the #} {# wrapper keeps the `.writer-app-header` scope for leaf CSS hooks. #} <div class="writer-app-header"> <div data-stx-app-header data-app-title="{{ writer_label|default:'SciTeX Writer' }}" {% if writer_version %}data-app-version="{{ writer_version }}"{% endif %}></div> <script type="module" src="{% static 'scitex_sdk/ui/js/app/app-header.js' %}"></script> {% if project_picker_available %}{% include "writer/_project_picker.html" %}{% endif %} <script type="module" src="{% static 'writer/js/header-picker.js' %}"></script> </div>