forked from tangled.org/core
Monorepo for Tangled — https://tangled.org
1{{ define "title" }} 2 interdiff of round #{{ .Round }} and #{{ sub .Round 1 }} &middot; pull #{{ .Pull.PullId }} &middot; {{ .RepoInfo.FullName }} 3{{ end }} 4 5 6{{ define "extrameta" }} 7 {{ $title := printf "interdiff of %d and %d &middot; %s &middot; pull #%d &middot; %s" .Round (sub .Round 1) .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" (unescapeHtml $title) "Url" $url) }} 11{{ end }} 12 13{{ define "content" }} 14 <section class="rounded drop-shadow-sm bg-white dark:bg-gray-800 py-4 px-6 dark:text-white"> 15 <header class="pb-2"> 16 <div class="flex gap-3 items-center mb-3"> 17 <a href="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/" class="flex items-center gap-2 font-medium"> 18 {{ i "arrow-left" "w-5 h-5" }} 19 back 20 </a> 21 <span class="select-none before:content-['\00B7']"></span> 22 interdiff of round #{{ .Round }} and #{{ sub .Round 1 }} 23 </div> 24 <div class="border-t border-gray-200 dark:border-gray-700 my-2"></div> 25 {{ template "repo/pulls/fragments/pullHeader" . }} 26 </header> 27 </section> 28 29{{ end }} 30 31{{ define "mainLayout" }} 32 <div class="px-1 col-span-full flex-grow flex flex-col gap-4"> 33 {{ block "contentLayout" . }} 34 {{ block "content" . }}{{ end }} 35 {{ end }} 36 37 {{ block "contentAfterLayout" . }} 38 <div class="flex-grow grid grid-cols-1 md:grid-cols-12 gap-4"> 39 <div class="flex flex-col gap-4 col-span-1 md:col-span-2"> 40 {{ block "contentAfterLeft" . }} {{ end }} 41 </div> 42 <main class="col-span-1 md:col-span-10"> 43 {{ block "contentAfter" . }}{{ end }} 44 </main> 45 </div> 46 {{ end }} 47 </div> 48{{ end }} 49 50{{ define "contentAfter" }} 51 {{ template "repo/fragments/interdiff" (list .RepoInfo.FullName .Interdiff .DiffOpts) }} 52{{end}} 53 54{{ define "contentAfterLeft" }} 55 <div class="flex flex-col gap-4 col-span-1 md:col-span-2"> 56 {{ template "repo/fragments/diffOpts" .DiffOpts }} 57 </div> 58 <div class="sticky top-0 flex-grow max-h-screen overflow-y-auto"> 59 {{ template "repo/fragments/interdiffFiles" .Interdiff }} 60 </div> 61{{end}}