forked from tangled.org/core
Monorepo for Tangled — https://tangled.org
1{{ define "title" }} 2 patch of {{ .Pull.Title }} &middot; round #{{ .Round }} &middot; pull #{{ .Pull.PullId }} &middot; {{ .RepoInfo.FullName }} 3{{ end }} 4 5{{ define "content" }} 6 {{ $stat := .Diff.Stat }} 7 <div class="rounded drop-shadow-sm bg-white dark:bg-gray-800 py-4 px-6 dark:text-white"> 8 <header class="pb-2"> 9 <div class="flex gap-3 items-center mb-3"> 10 <a href="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/" class="flex items-center gap-2 font-medium"> 11 {{ i "arrow-left" "w-5 h-5" }} 12 back 13 </a> 14 <span class="select-none before:content-['\00B7']"></span> 15 round #{{ .Round }} 16 <span class="select-none before:content-['\00B7']"></span> 17 <a href="/{{ .RepoInfo.FullName }}/pulls/{{ .Pull.PullId }}/round/{{ .Round }}.patch"> 18 view raw 19 </a> 20 </div> 21 <div class="border-t border-gray-200 dark:border-gray-700 my-2"></div> 22 <h1 class="text-2xl mt-3"> 23 {{ .Pull.Title }} 24 <span class="text-gray-500 dark:text-gray-400">#{{ .Pull.PullId }}</span> 25 </h1> 26 </header> 27 28 {{ $bgColor := "bg-gray-800" }} 29 {{ $icon := "ban" }} 30 31 {{ if .Pull.State.IsOpen }} 32 {{ $bgColor = "bg-green-600" }} 33 {{ $icon = "git-pull-request" }} 34 {{ else if .Pull.State.IsMerged }} 35 {{ $bgColor = "bg-purple-600" }} 36 {{ $icon = "git-merge" }} 37 {{ end }} 38 39 <section> 40 <div class="flex items-center gap-2"> 41 <div 42 id="state" 43 class="inline-flex items-center rounded px-3 py-1 {{ $bgColor }}" 44 > 45 {{ i $icon "w-4 h-4 mr-1.5 text-white" }} 46 <span class="text-white">{{ .Pull.State.String }}</span> 47 </div> 48 <span class="text-gray-500 dark:text-gray-400 text-sm"> 49 opened by 50 {{ $owner := index $.DidHandleMap .Pull.OwnerDid }} 51 <a href="/{{ $owner }}" class="no-underline hover:underline" 52 >{{ $owner }}</a 53 > 54 <span class="select-none before:content-['\00B7']"></span> 55 <time>{{ .Pull.Created | timeFmt }}</time> 56 <span class="select-none before:content-['\00B7']"></span> 57 <span>targeting branch 58 <span class="text-xs rounded bg-gray-100 dark:bg-gray-700 text-black dark:text-white font-mono px-2 mx-1/2 inline-flex items-center"> 59 {{ .Pull.TargetBranch }} 60 </span> 61 </span> 62 </span> 63 </div> 64 65 {{ if .Pull.Body }} 66 <article id="body" class="mt-2 prose dark:prose-invert"> 67 {{ .Pull.Body | markdown }} 68 </article> 69 {{ end }} 70 </section> 71 72 </div> 73 74 <section> 75 {{ template "fragments/diff" (list .RepoInfo.FullName .Diff) }} 76 </section> 77{{ end }}