1{{ define "title" }}
2 patch of {{ .Pull.Title }} · round #{{ .Round }} · pull #{{ .Pull.PullId }} · {{ .RepoInfo.FullName }}
3{{ end }}
4
5
6{{ define "extrameta" }}
7 {{ $title := printf "patch of %s · pull #%d · %s" .Pull.Title .Pull.PullId .RepoInfo.FullName }}
8 {{ $url := printf "https://tangled.org/%s/pulls/%d/round/%d" .RepoInfo.FullName .Pull.PullId .Round }}
9
10 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
11{{ end }}
12
13
14{{ define "content" }}
15<section>
16 <section
17 class="bg-white dark:bg-gray-800 p-6 rounded relative w-full mx-auto drop-shadow-sm dark:text-white"
18 >
19 <div class="flex gap-3 items-center mb-3">
20 <a href="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/" class="flex items-center gap-2 font-medium">
21 {{ i "arrow-left" "w-5 h-5" }}
22 back
23 </a>
24 <span class="select-none before:content-['\00B7']"></span>
25 round<span class="flex items-center">{{ i "hash" "w-4 h-4" }}{{ .Round }}</span>
26 <span class="select-none before:content-['\00B7']"></span>
27 <a href="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .Round }}.patch">
28 view raw
29 </a>
30 </div>
31 <div class="border-t border-gray-200 dark:border-gray-700 my-2"></div>
32 {{ template "repo/pulls/fragments/pullHeader" . }}
33 </section>
34</section>
35{{ end }}
36
37{{ define "mainLayout" }}
38 <div class="px-1 col-span-full flex-grow flex flex-col gap-4">
39 {{ block "contentLayout" . }}
40 {{ block "content" . }}{{ end }}
41 {{ end }}
42
43 {{ block "contentAfterLayout" . }}
44 <div class="flex-grow grid grid-cols-1 md:grid-cols-12 gap-4">
45 <div class="flex flex-col gap-4 col-span-1 md:col-span-2">
46 {{ block "contentAfterLeft" . }} {{ end }}
47 </div>
48 <main class="col-span-1 md:col-span-10">
49 {{ block "contentAfter" . }}{{ end }}
50 </main>
51 </div>
52 {{ end }}
53 </div>
54{{ end }}
55
56{{ define "contentAfter" }}
57 {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }}
58{{end}}
59
60{{ define "contentAfterLeft" }}
61 <div class="flex flex-col gap-4 col-span-1 md:col-span-2">
62 {{ template "repo/fragments/diffOpts" .DiffOpts }}
63 </div>
64 <div class="sticky top-0 flex-grow max-h-screen overflow-y-auto">
65 {{ template "repo/fragments/diffChangedFiles" .Diff }}
66 </div>
67{{end}}