this repo has no description
1{{ define "title" }} 2 {{ .Issue.Title }} &middot; 3 {{ .RepoInfo.FullName }} 4{{ end }} 5 6{{ define "repoContent" }} 7 <div class="flex items-center justify-between"> 8 <h1> 9 {{ .Issue.Title }} 10 <span class="text-gray-400">#{{ .Issue.IssueId }}</span> 11 </h1> 12 13 <time class="text-sm">{{ .Issue.Created | timeFmt }}</time> 14 </div> 15 16 {{ $bgColor := "bg-gray-800" }} 17 {{ $icon := "ban" }} 18 {{ if eq .State "open" }} 19 {{ $bgColor = "bg-green-600" }} 20 {{ $icon = "circle-dot" }} 21 {{ end }} 22 23 24 <section> 25 <div class="flex items-center gap-2"> 26 <div 27 id="state" 28 class="inline-flex items-center px-3 py-1 {{ $bgColor }}" 29 > 30 <i 31 data-lucide="{{ $icon }}" 32 class="w-4 h-4 mr-1.5 text-white" 33 ></i> 34 <span class="text-white">{{ .State }}</span> 35 </div> 36 <span class="text-gray-400 text-sm"> 37 opened by 38 {{ $owner := didOrHandle .Issue.OwnerDid .IssueOwnerHandle }} 39 <a href="/{{ $owner }}" class="no-underline hover:underline" 40 >{{ $owner }}</a 41 > 42 </span> 43 </div> 44 45 {{ if .Issue.Body }} 46 <article id="body" class="mt-8 border border-gray-300 px-4 py-6"> 47 {{ .Issue.Body | escapeHtml }} 48 </article> 49 {{ end }} 50 </section> 51 52 <hr class="my-10" /> 53 54 <section id="comments" class="mt-8 space-y-4 relative"> 55 {{ range $index, $comment := .Comments }} 56 <div 57 id="comment-{{ .CommentId }}" 58 class="border border-gray-200 p-4 relative" 59 > 60 {{ if ne $index 0 }} 61 <div 62 class="absolute left-8 -top-4 w-px h-4 bg-gray-200" 63 ></div> 64 {{ end }} 65 <div class="flex items-center gap-2 mb-2"> 66 {{ $owner := index $.DidHandleMap .OwnerDid }} 67 <span class="text-gray-400 text-sm"> 68 <a 69 href="{{ $owner }}" 70 class="no-underline hover:underline" 71 >{{ $owner }}</a 72 > 73 </span> 74 <a 75 href="#{{ .CommentId }}" 76 class="text-gray-500 text-sm hover:text-gray-500 hover:underline no-underline" 77 id="{{ .CommentId }}" 78 > 79 {{ .Created | timeFmt }} 80 </a> 81 </div> 82 <div class=""> 83 {{ nl2br .Body }} 84 </div> 85 </div> 86 {{ end }} 87 </section> 88 89 {{ if .LoggedInUser }} 90 <form 91 hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment" 92 class="mt-8" 93 > 94 <textarea 95 name="body" 96 class="w-full p-2 border border-gray-200" 97 placeholder="Add to the discussion..." 98 ></textarea> 99 <button type="submit" class="btn mt-2">comment</button> 100 <div id="issue-comment"></div> 101 </form> 102 {{ end }} 103 104 {{ if eq .LoggedInUser.Did .Issue.OwnerDid }} 105 {{ $action := "close" }} 106 {{ $icon := "circle-x" }} 107 {{ $hoverColor := "red" }} 108 {{ if eq .State "closed" }} 109 {{ $action = "reopen" }} 110 {{ $icon = "circle-dot" }} 111 {{ $hoverColor = "green" }} 112 {{ end }} 113 <form 114 hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/{{ $action }}" 115 hx-swap="none" 116 class="mt-8" 117 > 118 <button type="submit" class="btn hover:bg-{{ $hoverColor }}-300"> 119 <i 120 data-lucide="{{ $icon }}" 121 class="w-4 h-4 mr-2 text-{{ $hoverColor }}-400" 122 ></i> 123 <span class="text-black">{{ $action }}</span> 124 </button> 125 <div id="issue-action" class="error"></div> 126 </form> 127 {{ end }} 128{{ end }}