A vibe coded tangled fork which supports pijul.
at 86d0b4060de074759eff40666b90be86c244ab23 92 lines 3.2 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 {{ $owner := resolve .Pull.OwnerDid }} 21 <section class="mt-2"> 22 <div class="flex items-center gap-2"> 23 <div 24 id="state" 25 class="inline-flex items-center rounded px-3 py-1 {{ $bgColor }}"> 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 30 class="text-gray-500 dark:text-gray-400 text-sm flex flex-wrap items-center gap-1"> 31 opened by 32 {{ template "user/fragments/picHandleLink" .Pull.OwnerDid }} 33 <span class="select-none before:content-['\00B7']"></span> 34 {{ template "repo/fragments/time" .Pull.Created }} 35 36 37 <span class="select-none before:content-['\00B7']"></span> 38 <span> 39 targeting 40 <span 41 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"> 42 <a 43 href="/{{ .RepoInfo.FullName }}/tree/{{ .Pull.TargetBranch }}" 44 class="no-underline hover:underline"> 45 {{ .Pull.TargetBranch }} 46 </a> 47 </span> 48 </span> 49 {{ if not .Pull.IsPatchBased }} 50 from 51 <span 52 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"> 53 {{ if .Pull.IsForkBased }} 54 {{ if .Pull.PullSource.Repo }} 55 <a 56 href="/{{ $owner }}/{{ .Pull.PullSource.Repo.Name }}" 57 class="no-underline hover:underline"> 58 {{ $owner }}/{{ .Pull.PullSource.Repo.Name }} 59 </a> 60 : 61 {{- else -}} 62 <span class="italic">[deleted fork]</span> 63 {{- end -}} 64 {{- end -}} 65 {{- .Pull.PullSource.Branch -}} 66 </span> 67 {{ end }} 68 </span> 69 </div> 70 71 {{ if .Pull.Body }} 72 <article id="body" class="mt-8 prose dark:prose-invert"> 73 {{ .Pull.Body | markdown }} 74 </article> 75 {{ end }} 76 77 {{ with .OrderedReactionKinds }} 78 <div class="flex items-center gap-2 mt-2"> 79 {{ template "repo/fragments/reactionsPopUp" . }} 80 {{ range $kind := . }} 81 {{ template "repo/fragments/reaction" 82 (dict 83 "Kind" $kind 84 "Count" (index $.Reactions $kind) 85 "IsReacted" (index $.UserReacted $kind) 86 "ThreadAt" $.Pull.PullAt) 87 }} 88 {{ end }} 89 </div> 90 {{ end }} 91 </section> 92{{ end }}