forked from tangled.org/core
this repo has no description
at file-tree 2.7 kB view raw
1{{ define "repo/pulls/fragments/pullHeader" }} 2<header class="pb-4"> 3 <h1 class="text-2xl dark:text-white"> 4 {{ .Pull.Title }} 5 <span class="text-gray-500 dark:text-gray-400">#{{ .Pull.PullId }}</span> 6 </h1> 7</header> 8 9{{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} 10{{ $icon := "ban" }} 11 12{{ if .Pull.State.IsOpen }} 13 {{ $bgColor = "bg-green-600 dark:bg-green-700" }} 14 {{ $icon = "git-pull-request" }} 15{{ else if .Pull.State.IsMerged }} 16 {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }} 17 {{ $icon = "git-merge" }} 18{{ end }} 19 20<section class="mt-2"> 21 <div class="flex items-center gap-2"> 22 <div 23 id="state" 24 class="inline-flex items-center rounded px-3 py-1 {{ $bgColor }}" 25 > 26 {{ i $icon "w-4 h-4 mr-1.5 text-white" }} 27 <span class="text-white">{{ .Pull.State.String }}</span> 28 </div> 29 <span class="text-gray-500 dark:text-gray-400 text-sm"> 30 opened by 31 {{ $owner := index $.DidHandleMap .Pull.OwnerDid }} 32 <a href="/{{ $owner }}" class="no-underline hover:underline" 33 >{{ $owner }}</a 34 > 35 <span class="select-none before:content-['\00B7']"></span> 36 <time>{{ .Pull.Created | timeFmt }}</time> 37 <span class="select-none before:content-['\00B7']"></span> 38 <span> 39 targeting 40 <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"> 41 <a href="/{{ .RepoInfo.FullName }}/tree/{{ .Pull.TargetBranch }}" class="no-underline hover:underline">{{ .Pull.TargetBranch }}</a> 42 </span> 43 </span> 44 {{ if not .Pull.IsPatchBased }} 45 <span>from 46 {{ if .Pull.IsForkBased }} 47 {{ if .Pull.PullSource.Repo }} 48 <a href="/{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}" class="no-underline hover:underline">{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}</a> 49 {{ else }} 50 <span class="italic">[deleted fork]</span> 51 {{ end }} 52 {{ end }} 53 54 <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"> 55 {{ .Pull.PullSource.Branch }} 56 </span> 57 </span> 58 {{ end }} 59 </span> 60 </div> 61 62 {{ if .Pull.Body }} 63 <article id="body" class="mt-8 prose dark:prose-invert"> 64 {{ .Pull.Body | markdown }} 65 </article> 66 {{ end }} 67</section> 68 69 70{{ end }}