A vibe coded tangled fork which supports pijul.
at acff01ecb340ced1ece567ee4e81de3af265c588 61 lines 2.3 kB view raw
1{{ define "repo/issues/fragments/issueComment" }} 2 {{ with .Comment }} 3 <div id="comment-container-{{ .CommentId }}"> 4 <div 5 class="flex items-center gap-2 mb-2 text-gray-500 dark:text-gray-400 text-sm flex-wrap"> 6 {{ template "user/fragments/picHandleLink" .OwnerDid }} 7 8 9 <!-- show user "hats" --> 10 {{ $isIssueAuthor := eq .OwnerDid $.Issue.OwnerDid }} 11 {{ if $isIssueAuthor }} 12 <span class="before:content-['·']"></span> 13 author 14 {{ end }} 15 16 17 <span class="before:content-['·']"></span> 18 <a 19 href="#{{ .CommentId }}" 20 class="text-gray-500 dark:text-gray-400 hover:text-gray-500 dark:hover:text-gray-400 hover:underline no-underline" 21 id="{{ .CommentId }}"> 22 {{ if .Deleted }} 23 deleted 24 {{ template "repo/fragments/time" .Deleted }} 25 {{ else if .Edited }} 26 edited 27 {{ template "repo/fragments/time" .Edited }} 28 {{ else }} 29 {{ template "repo/fragments/time" .Created }} 30 {{ end }} 31 </a> 32 33 {{ $isCommentOwner := and $.LoggedInUser (eq $.LoggedInUser.Did .OwnerDid) }} 34 {{ if and $isCommentOwner (not .Deleted) }} 35 <button 36 class="btn px-2 py-1 text-sm" 37 hx-get="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/edit" 38 hx-swap="outerHTML" 39 hx-target="#comment-container-{{ .CommentId }}"> 40 {{ i "pencil" "w-4 h-4" }} 41 </button> 42 <button 43 class="btn px-2 py-1 text-sm text-red-500 flex gap-2 items-center group" 44 hx-delete="/{{ $.RepoInfo.FullName }}/issues/{{ .Issue }}/comment/{{ .CommentId }}/" 45 hx-confirm="Are you sure you want to delete your comment?" 46 hx-swap="outerHTML" 47 hx-target="#comment-container-{{ .CommentId }}"> 48 {{ i "trash-2" "w-4 h-4" }} 49 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 50 </button> 51 {{ end }} 52 53 </div> 54 {{ if not .Deleted }} 55 <div class="prose dark:prose-invert"> 56 {{ .Body | markdown }} 57 </div> 58 {{ end }} 59 </div> 60 {{ end }} 61{{ end }}