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.sh/%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 "topbarLayout" }}
38 <header class="px-1 col-span-full" style="z-index: 20;">
39 {{ template "layouts/topbar" . }}
40 </header>
41{{ end }}
42
43{{ define "mainLayout" }}
44 <div class="px-1 col-span-full flex flex-col gap-4">
45 {{ block "contentLayout" . }}
46 {{ block "content" . }}{{ end }}
47 {{ end }}
48
49 {{ block "contentAfterLayout" . }}
50 <div class="flex-grow grid grid-cols-1 md:grid-cols-12 gap-4">
51 <div class="flex flex-col gap-4 col-span-1 md:col-span-2">
52 {{ block "contentAfterLeft" . }} {{ end }}
53 </div>
54 <main class="col-span-1 md:col-span-10">
55 {{ block "contentAfter" . }}{{ end }}
56 </main>
57 </div>
58 {{ end }}
59 </div>
60{{ end }}
61
62{{ define "footerLayout" }}
63 <footer class="px-1 col-span-full mt-12">
64 {{ template "layouts/footer" . }}
65 </footer>
66{{ end }}
67
68{{ define "contentAfter" }}
69 {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }}
70{{end}}
71
72{{ define "contentAfterLeft" }}
73 <div class="flex flex-col gap-4 col-span-1 md:col-span-2">
74 {{ template "repo/fragments/diffOpts" .DiffOpts }}
75 </div>
76 <div class="sticky top-0 flex-grow max-h-screen">
77 {{ template "repo/fragments/diffChangedFiles" .Diff }}
78 </div>
79{{end}}