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 class="m-2"> 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">{{ $owner }}</a> 40 </span> 41 </div> 42 43 {{ if .Issue.Body }} 44 <article id="body" class="mt-8"> 45 {{ .Issue.Body | escapeHtml }} 46 </article> 47 {{ end }} 48 </section> 49 50 <section id="comments" class="mt-8 space-y-4"> 51 {{ range .Comments }} 52 <div 53 id="comment-{{ .CommentId }}" 54 class="border border-gray-200 p-4" 55 > 56 <div class="flex items-center gap-2 mb-2"> 57 {{ $owner := index $.DidHandleMap .OwnerDid }} 58 <span class="text-gray-400 text-sm"> 59 <a href="{{ $owner }}" class="no-underline hover:underline">{{ $owner }}</a> 60 </span> 61 <span class="text-gray-500 text-sm"> 62 {{ .Created | timeFmt }} 63 </span> 64 </div> 65 <div class=""> 66 {{ nl2br .Body }} 67 </div> 68 </div> 69 {{ end }} 70 </section> 71 72 {{ if .LoggedInUser }} 73 <form 74 hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/comment" 75 class="mt-8" 76 > 77 <textarea 78 name="body" 79 class="w-full p-2 border border-gray-200" 80 placeholder="Add to the discussion..." 81 ></textarea> 82 <button type="submit" class="btn mt-2">comment</button> 83 <div id="issue-comment"></div> 84 </form> 85 {{ end }} 86 87 {{ if eq .LoggedInUser.Did .Issue.OwnerDid }} 88 {{ $action := "close" }} 89 {{ $icon := "circle-x" }} 90 {{ $hoverColor := "red" }} 91 {{ if eq .State "closed" }} 92 {{ $action = "reopen" }} 93 {{ $icon = "circle-dot" }} 94 {{ $hoverColor = "green" }} 95 {{ end }} 96 <form 97 hx-post="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/{{ $action }}" 98 hx-swap="none" 99 class="mt-8" 100 > 101 <button type="submit" class="btn hover:bg-{{ $hoverColor }}-300"> 102 <i 103 data-lucide="{{ $icon }}" 104 class="w-4 h-4 mr-2 text-{{ $hoverColor }}-400" 105 ></i> 106 <span class="text-black">{{ $action }}</span> 107 </button> 108 <div id="issue-action" class="error"></div> 109 </form> 110 {{ end }} 111{{ end }}