{{ define "title" }}
  comparing {{ .Base }} and {{ .Head }} on {{ .RepoInfo.FullName }}
{{ end }}

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

{{ define "topbarLayout" }}
  <header class="px-1 col-span-full" style="z-index: 20;">
    {{ template "layouts/fragments/topbar" . }}
  </header>
{{ 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) }}
{{end}}
