this repo has no description
1{{ define "title" }}{{ .Issue.Title }} &middot; issue #{{ .Issue.IssueId }} &middot; {{ .RepoInfo.FullName }}{{ end }} 2 3 4{{ define "extrameta" }} 5 {{ template "repo/issues/fragments/og" (dict "RepoInfo" .RepoInfo "Issue" .Issue) }} 6{{ end }} 7 8{{ define "repoContentLayout" }} 9 <div class="grid grid-cols-1 md:grid-cols-10 gap-4 w-full"> 10 <div class="col-span-1 md:col-span-8"> 11 <section class="bg-white dark:bg-gray-800 p-6 rounded relative w-full mx-auto dark:text-white"> 12 {{ block "repoContent" . }}{{ end }} 13 </section> 14 {{ block "repoAfter" . }}{{ end }} 15 </div> 16 <div class="col-span-1 md:col-span-2 flex flex-col gap-6"> 17 {{ template "repo/fragments/labelPanel" 18 (dict "RepoInfo" $.RepoInfo 19 "Defs" $.LabelDefs 20 "Subject" $.Issue.AtUri 21 "State" $.Issue.Labels) }} 22 {{ template "repo/fragments/participants" $.Issue.Participants }} 23 {{ template "repo/fragments/backlinks" 24 (dict "RepoInfo" $.RepoInfo 25 "Backlinks" $.Backlinks) }} 26 {{ template "repo/fragments/externalLinkPanel" $.Issue.AtUri }} 27 </div> 28 </div> 29{{ end }} 30 31{{ define "repoContent" }} 32<section id="issue-{{ .Issue.IssueId }}"> 33 {{ template "issueHeader" .Issue }} 34 {{ template "issueInfo" . }} 35 {{ if .Issue.Body }} 36 <article id="body" class="mt-4 prose dark:prose-invert">{{ .Issue.Body | markdown }}</article> 37 {{ end }} 38 <div class="mt-4"> 39 {{ template "repo/fragments/reactions" 40 (dict "Reactions" .Reactions 41 "UserReacted" .UserReacted 42 "ThreadAt" .Issue.AtUri) }} 43 </div> 44</section> 45{{ end }} 46 47{{ define "issueHeader" }} 48 <header class="pb-2"> 49 <h1 class="text-2xl"> 50 {{ .Title | description }} 51 <span class="text-gray-500 dark:text-gray-400">#{{ .IssueId }}</span> 52 </h1> 53 </header> 54{{ end }} 55 56{{ define "issueInfo" }} 57 {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} 58 {{ $icon := "ban" }} 59 {{ if eq .Issue.State "open" }} 60 {{ $bgColor = "bg-green-600 dark:bg-green-700" }} 61 {{ $icon = "circle-dot" }} 62 {{ end }} 63 <div class="inline-flex items-center gap-2"> 64 <div id="state" 65 class="inline-flex items-center rounded px-3 py-1 {{ $bgColor }}"> 66 {{ i $icon "w-4 h-4 mr-1.5 text-white" }} 67 <span class="text-white">{{ .Issue.State }}</span> 68 </div> 69 <span class="text-gray-500 dark:text-gray-400 text-sm flex flex-wrap items-center gap-1"> 70 opened by 71 {{ template "user/fragments/picHandleLink" .Issue.Did }} 72 <span class="select-none before:content-['\00B7']"></span> 73 {{ if .Issue.Edited }} 74 edited {{ template "repo/fragments/time" .Issue.Edited }} 75 {{ else }} 76 {{ template "repo/fragments/time" .Issue.Created }} 77 {{ end }} 78 </span> 79 80 {{ if and .LoggedInUser (eq .LoggedInUser.Did .Issue.Did) }} 81 {{ template "issueActions" . }} 82 {{ end }} 83 </div> 84 <div id="issue-actions-error" class="error"></div> 85{{ end }} 86 87{{ define "issueActions" }} 88 {{ template "editIssue" . }} 89 {{ template "deleteIssue" . }} 90{{ end }} 91 92{{ define "editIssue" }} 93 <a 94 class="text-gray-500 dark:text-gray-400 flex gap-1 items-center group cursor-pointer" 95 hx-get="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/edit" 96 hx-swap="innerHTML" 97 hx-target="#issue-{{.Issue.IssueId}}"> 98 {{ i "pencil" "size-3" }} 99 </a> 100{{ end }} 101 102{{ define "deleteIssue" }} 103 <a 104 class="text-gray-500 dark:text-gray-400 flex gap-1 items-center group cursor-pointer" 105 hx-delete="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/" 106 hx-confirm="Are you sure you want to delete your issue?" 107 hx-swap="none"> 108 {{ i "trash-2" "size-3" }} 109 {{ i "loader-circle" "size-3 animate-spin hidden group-[.htmx-request]:inline" }} 110 </a> 111{{ end }} 112 113{{ define "repoAfter" }} 114 <div class="flex flex-col gap-4 mt-4"> 115 {{ 116 template "repo/issues/fragments/commentList" 117 (dict 118 "RepoInfo" $.RepoInfo 119 "LoggedInUser" $.LoggedInUser 120 "Issue" $.Issue 121 "CommentList" $.Issue.CommentList) 122 }} 123 124 {{ template "repo/issues/fragments/newComment" . }} 125 </div> 126{{ end }}