{{/*
  The SourceHut chrome. The brand, the service switcher, the login block and the
  environment banner are NOT rendered here: they come from sr-ht-ecore's shared
  partials ("srht-env-banner", "srht-nav"), which every custom service on the
  instance draws from one copy. The dot is this package's viewData, which embeds
  chrome.Page, so the fields those partials read promote into it.

  What is left here is the document, the diff-status colours below (compare's
  own, and nobody else's), and three seams: "head" and "scripts" are blocks, so
  a page that needs neither still renders; "content" is a {{template}} and must
  stay one — a block would give every page an empty default, which is the chrome
  around a hole served 200 for the page that forgot to define it. ecore's
  pages.Load refuses such a page at startup, and it can go on doing so only
  while this line stays a {{template}}.
*/}}
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{.Title}}</title>
    <link rel="icon" type="image/svg+xml" href="/static/logo.svg">
    {{/* Guarded rather than emitted empty: <link href=""> re-requests the page
         it is on, which is a page load per page load. assets.Resolve answers ""
         for a binary built without `make css`, which is a checkout run from
         source; a deployed build always has the artefact and always takes
         this. */}}
    {{if .StyleHref}}<link rel="stylesheet" href="{{.StyleHref}}">{{end}}
    <style>
      /* Semantic status badge for the changed-files table. The default table
         cell colour is too dim on the dark chrome, so each git status gets an
         intentional, legible colour in both light and dark schemes. */
      .diff-status {
        display: inline-block;
        min-width: 1.6rem;
        padding: 0 0.4rem;
        border: 1px solid currentColor;
        border-radius: 3px;
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1.5;
        text-align: center;
      }
      .diff-status-a { color: #1a7f37; }
      .diff-status-m { color: #9a6700; }
      .diff-status-d { color: #cf222e; }
      .diff-status-r { color: #0969da; }
      .diff-status-o { color: #6e7781; }
      @media (prefers-color-scheme: dark) {
        .diff-status-a { color: #3fb950; }
        .diff-status-m { color: #d29922; }
        .diff-status-d { color: #f85149; }
        .diff-status-r { color: #58a6ff; }
        .diff-status-o { color: #8b949e; }
      }
    </style>
    {{block "head" .}}{{end}}
  </head>
  <body>
    {{template "srht-env-banner" .}}
    <nav class="container navbar navbar-light navbar-expand-sm">
      {{template "srht-nav" .}}
    </nav>
    <div class="{{.ContainerClass}}">
      {{template "content" .}}
    </div>
    {{block "scripts" .}}{{end}}
  </body>
</html>
