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.sh/%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{{ end }} 60 61{{ define "issueActions" }} 62 {{ template "editIssue" . }} 63 {{ template "deleteIssue" . }} 64{{ end }} 65 66{{ define "editIssue" }} 67 <a 68 class="text-gray-500 dark:text-gray-400 flex gap-1 items-center group" 69 hx-get="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/edit" 70 hx-swap="innerHTML" 71 hx-target="#issue-{{.Issue.IssueId}}"> 72 {{ i "pencil" "size-3" }} 73 </a> 74{{ end }} 75 76{{ define "deleteIssue" }} 77 <a 78 class="text-gray-500 dark:text-gray-400 flex gap-1 items-center group" 79 hx-delete="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/delete" 80 hx-confirm="Are you sure you want to delete your issue?" 81 hx-swap="innerHTML" 82 hx-target="#comment-body-{{.Issue.IssueId}}" 83 > 84 {{ i "trash-2" "size-3" }} 85 {{ i "loader-circle" "size-3 animate-spin hidden group-[.htmx-request]:inline" }} 86 </a> 87{{ end }} 88 89{{ define "issueReactions" }} 90 <div class="flex items-center gap-2 mt-2"> 91 {{ template "repo/fragments/reactionsPopUp" .OrderedReactionKinds }} 92 {{ range $kind := .OrderedReactionKinds }} 93 {{ 94 template "repo/fragments/reaction" 95 (dict 96 "Kind" $kind 97 "Count" (index $.Reactions $kind) 98 "IsReacted" (index $.UserReacted $kind) 99 "ThreadAt" $.Issue.AtUri) 100 }} 101 {{ end }} 102 </div> 103{{ end }} 104 105{{ define "repoAfter" }} 106 <div class="flex flex-col gap-4 mt-4"> 107 {{ 108 template "repo/issues/fragments/commentList" 109 (dict 110 "RepoInfo" $.RepoInfo 111 "LoggedInUser" $.LoggedInUser 112 "Issue" $.Issue 113 "CommentList" $.Issue.CommentList) 114 }} 115 116 {{ template "repo/issues/fragments/newComment" . }} 117 <div> 118{{ end }} 119