"""Wrap every fragment in src/ with the panel shell and write it next to this file. The mockups are static HTML, but thirty pages share one navbar; keeping that navbar in one place is the only reason this script exists. Run it from anywhere: python docs/assets/panel-redesign/panel/build.py A fragment starts with one meta comment: section/page pick the highlighted entries; "shell: bare" skips the navbar (sign-in, setup). """ import pathlib import re HERE = pathlib.Path(__file__).parent NAV = [ ("overview", "Overview", "overview.html", "ti-activity-heartbeat", []), ("outbound", "Outbound", "out-domains.html", "ti-send", [ ("domains", "Domains", "out-domains.html", "ti-world-upload"), ("log", "Log", "out-log.html", "ti-list-details"), ("queue", "Queue", "out-queue.html", "ti-stack-2"), ("dmarc", "DMARC reports", "dmarc.html", "ti-report-analytics"), ]), ("inbound", "Inbound", "in-domains.html", "ti-inbox", [ ("domains", "Domains", "in-domains.html", "ti-world-download"), ("log", "Log", "in-log.html", "ti-list-details"), ("queue", "Queue", "in-queue.html", "ti-stack-2"), ("quarantine", "Quarantine", "in-quarantine.html", "ti-mail-pause"), ("filter-lists", "Filter lists", "in-filter-lists.html", "ti-filter"), ]), ("server", "Server", "health.html", "ti-server-2", [ ("health", "Health", "health.html", "ti-heartbeat"), ("preflight", "Preflight", "preflight.html", "ti-checklist"), ("system-log", "System log", "system-log.html", "ti-file-text"), ("backup", "Backup", "backup.html", "ti-archive"), ("users", "Users", "users.html", "ti-users"), ("settings", "Settings", "settings.html", "ti-settings"), ]), ] HEAD = """