"""Plain branded HTML for the states a visitor can hit that aren't the app itself: the slug isn't published (or was taken down), or the page is loaded on the apex instead of a {slug}.openswarm.host subdomain. Kept inline + dependency-free so the edge can answer even when it can't reach storage.""" from __future__ import annotations _STYLE = ( "font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;" "background:#faf9f7;color:#2b2b2b;margin:0;min-height:100vh;display:flex;" "align-items:center;justify-content:center;text-align:center;padding:24px;" ) def _page(title: str, message: str, status_note: str = "") -> str: note = f"

{status_note}

" if status_note else "" return ( "" "" f"{title}" f"
" f"
🐙
" f"

{title}

" f"

{message}

" f"{note}" "

Build your own with OpenSwarm →

" "
" ) def not_found_page() -> str: return _page( "App not found", "There's no published app at this address. It may have been unpublished or never existed.", ) def apex_page() -> str: return _page( "OpenSwarm Apps", "Apps published from OpenSwarm live at their own subdomain here.", )