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