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