{{ define "title" }}
  Comparing {{ .Base }} and {{ .Head }} &middot; {{ .RepoInfo.FullName }} &middot; Tangled
{{ end }}

{{ define "repoContent" }}
  {{ template "repo/fragments/compareForm" . }}
  {{ $isPushAllowed := and .LoggedInUser .RepoInfo.Roles.IsPushAllowed }}
  {{ if $isPushAllowed }}
    {{ template "repo/fragments/compareAllowPull" . }}
  {{ end }}
{{ end }}

{{ define "mainLayout" }}
  <div class="px-1 flex-grow col-span-full flex flex-col gap-4">
    {{ block "contentLayout" . }}
      {{ block "content" . }}{{ end }}
    {{ end }}

    {{ block "contentAfter" . }}{{ end }}
  </div>
{{ end }}

{{ define "contentAfter" }}
  {{ template "repo/fragments/diff" (list .Diff .DiffOpts "" (printf "/%s/blob/%s" .RepoInfo.FullName (pathEscape .Head))) }}
{{end}}
