<!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">
    <link rel="stylesheet" href="{{.CSSHref}}">
    <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>
    {{if .ShowBanner}}
    <div style="background: #228800; color: white; font-weight: bold; width: 100%; text-align: center">
      {{.Environment}} ENVIRONMENT
    </div>
    {{end}}
    <nav class="container navbar navbar-light navbar-expand-sm">
      {{if .HubOrigin}}
      <span class="navbar-brand">
        <a href="{{.HubOrigin}}">{{.SiteName}}</a>
      </span>
      {{else}}
      <span class="navbar-brand">
        <a class="navbar-brand" href="/">
          {{.SiteName}}
          <span class="text-danger">compare</span>
        </a>
      </span>
      {{end}}
      <ul class="navbar-nav">
        {{if .Username}}
        {{range .Nav}}
        <li class="nav-item {{if .Active}}active{{end}}">
          <a class="nav-link" href="{{.Origin}}">{{.Name}}</a>
        </li>
        {{end}}
        {{end}}
      </ul>
      <div class="login">
        {{if .Username}}
        <span class="navbar-text">
          Logged in as
          <a href="{{.ProfileURL}}">{{.Username}}</a>
          &mdash;
          <a href="{{.LogoutURL}}">Log out</a>
        </span>
        {{else}}
        <span class="navbar-text">
          <a href="{{.LoginURL}}" rel="nofollow">Log in</a>
          &mdash;
          <a href="{{.RegisterURL}}">Register</a>
        </span>
        {{end}}
      </div>
    </nav>
    <div class="{{.ContainerClass}}">
      {{template "content" .}}
    </div>
    {{block "scripts" .}}{{end}}
  </body>
</html>
