1{{ define "title" }}
2 comparing {{ .Base }} and {{ .Head }} on {{ .RepoInfo.FullName }}
3{{ end }}
4
5{{ define "repoContent" }}
6 {{ template "repo/fragments/compareForm" . }}
7 {{ $isPushAllowed := and .LoggedInUser .RepoInfo.Roles.IsPushAllowed }}
8 {{ if $isPushAllowed }}
9 {{ template "repo/fragments/compareAllowPull" . }}
10 {{ end }}
11{{ end }}
12
13{{ define "topbarLayout" }}
14 <header class="px-1 col-span-full" style="z-index: 20;">
15 {{ template "layouts/topbar" . }}
16 </header>
17{{ end }}
18
19{{ define "mainLayout" }}
20 <div class="px-1 col-span-full flex flex-col gap-4">
21 {{ block "contentLayout" . }}
22 {{ block "content" . }}{{ end }}
23 {{ end }}
24
25 {{ block "contentAfterLayout" . }}
26 <div class="flex-grow grid grid-cols-1 md:grid-cols-12 gap-4">
27 <div class="flex flex-col gap-4 col-span-1 md:col-span-2">
28 {{ block "contentAfterLeft" . }} {{ end }}
29 </div>
30 <main class="col-span-1 md:col-span-10">
31 {{ block "contentAfter" . }}{{ end }}
32 </main>
33 </div>
34 {{ end }}
35 </div>
36{{ end }}
37
38{{ define "footerLayout" }}
39 <footer class="px-1 col-span-full mt-12">
40 {{ template "layouts/footer" . }}
41 </footer>
42{{ end }}
43
44{{ define "contentAfter" }}
45 {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }}
46{{end}}
47
48{{ define "contentAfterLeft" }}
49 <div class="flex flex-col gap-4 col-span-1 md:col-span-2">
50 {{ template "repo/fragments/diffOpts" .DiffOpts }}
51 </div>
52 <div class="sticky top-0 flex-grow max-h-screen">
53 {{ template "repo/fragments/diffChangedFiles" .Diff }}
54 </div>
55{{end}}