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