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-4 gap-4 w-full"> 13 <div class="col-span-1 md:col-span-3"> 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 flex flex-col gap-6"> 20 {{ template "issueLabels" . }} 21 {{ template "issueParticipants" . }} 22 </div> 23 </div> 24{{ end }} 25 26{{ define "repoContent" }} 27<section id="issue-{{ .Issue.IssueId }}"> 28 {{ template "issueHeader" .Issue }} 29 {{ template "issueInfo" . }} 30 {{ if .Issue.Body }} 31 <article id="body" class="mt-4 prose dark:prose-invert">{{ .Issue.Body | markdown }}</article> 32 {{ end }} 33 <div class="flex flex-wrap gap-2 items-stretch"> 34 {{ template "issueReactions" . }} 35 {{ template "issueLabels" . }} 36 </div> 37</section> 38{{ end }} 39 40{{ define "issueHeader" }} 41 <header class="pb-2"> 42 <h1 class="text-2xl"> 43 {{ .Title | description }} 44 <span class="text-gray-500 dark:text-gray-400">#{{ .IssueId }}</span> 45 </h1> 46 </header> 47{{ end }} 48 49{{ define "issueInfo" }} 50 {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} 51 {{ $icon := "ban" }} 52 {{ if eq .Issue.State "open" }} 53 {{ $bgColor = "bg-green-600 dark:bg-green-700" }} 54 {{ $icon = "circle-dot" }} 55 {{ end }} 56 <div class="inline-flex items-center gap-2"> 57 <div id="state" 58 class="inline-flex items-center rounded px-3 py-1 {{ $bgColor }}"> 59 {{ i $icon "w-4 h-4 mr-1.5 text-white" }} 60 <span class="text-white">{{ .Issue.State }}</span> 61 </div> 62 <span class="text-gray-500 dark:text-gray-400 text-sm flex flex-wrap items-center gap-1"> 63 opened by 64 {{ template "user/fragments/picHandleLink" .Issue.Did }} 65 <span class="select-none before:content-['\00B7']"></span> 66 {{ if .Issue.Edited }} 67 edited {{ template "repo/fragments/time" .Issue.Edited }} 68 {{ else }} 69 {{ template "repo/fragments/time" .Issue.Created }} 70 {{ end }} 71 </span> 72 73 {{ if and .LoggedInUser (eq .LoggedInUser.Did .Issue.Did) }} 74 {{ template "issueActions" . }} 75 {{ end }} 76 </div> 77 <div id="issue-actions-error" class="error"></div> 78{{ end }} 79 80{{ define "issueActions" }} 81 {{ template "editIssue" . }} 82 {{ template "deleteIssue" . }} 83{{ end }} 84 85{{ define "editIssue" }} 86 <a 87 class="text-gray-500 dark:text-gray-400 flex gap-1 items-center group" 88 hx-get="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/edit" 89 hx-swap="innerHTML" 90 hx-target="#issue-{{.Issue.IssueId}}"> 91 {{ i "pencil" "size-3" }} 92 </a> 93{{ end }} 94 95{{ define "deleteIssue" }} 96 <a 97 class="text-gray-500 dark:text-gray-400 flex gap-1 items-center group" 98 hx-delete="/{{ .RepoInfo.FullName }}/issues/{{ .Issue.IssueId }}/" 99 hx-confirm="Are you sure you want to delete your issue?" 100 hx-swap="none"> 101 {{ i "trash-2" "size-3" }} 102 {{ i "loader-circle" "size-3 animate-spin hidden group-[.htmx-request]:inline" }} 103 </a> 104{{ end }} 105 106{{ define "issueReactions" }} 107 <div class="flex items-center gap-2"> 108 {{ template "repo/fragments/reactionsPopUp" .OrderedReactionKinds }} 109 {{ range $kind := .OrderedReactionKinds }} 110 {{ 111 template "repo/fragments/reaction" 112 (dict 113 "Kind" $kind 114 "Count" (index $.Reactions $kind) 115 "IsReacted" (index $.UserReacted $kind) 116 "ThreadAt" $.Issue.AtUri) 117 }} 118 {{ end }} 119 </div> 120{{ end }} 121 122{{ define "issueLabels" }} 123 {{ range $k, $valset := $.Issue.Labels.Inner }} 124 {{ $d := index $.LabelDefs $k }} 125 {{ range $v, $s := $valset }} 126 {{ template "labels/fragments/label" (dict "def" $d "val" $v) }} 127 {{ end }} 128 {{ end }} 129 130 <button 131 class="btn text-gray-500 dark:text-gray-400" 132 popovertarget="add-label-modal" 133 {{ if not (or .RepoInfo.Roles.IsOwner .RepoInfo.Roles.IsCollaborator) }}disabled{{ end }} 134 popovertargetaction="toggle"> 135 {{ i "plus" "size-4" }} 136 </button> 137 <div 138 id="add-label-modal" 139 popover 140 class="bg-white w-full sm:w-96 dark:bg-gray-800 p-6 rounded border border-gray-200 dark:border-gray-700 drop-shadow dark:text-white backdrop:bg-gray-400/50 dark:backdrop:bg-gray-800/50"> 141 {{ template "repo/fragments/addLabelModal" (dict "root" $ "subject" $.Issue.AtUri.String "state" $.Issue.Labels) }} 142 </div> 143{{ end }} 144 145{{ define "repoAfter" }} 146 <div class="flex flex-col gap-4 mt-4"> 147 {{ 148 template "repo/issues/fragments/commentList" 149 (dict 150 "RepoInfo" $.RepoInfo 151 "LoggedInUser" $.LoggedInUser 152 "Issue" $.Issue 153 "CommentList" $.Issue.CommentList) 154 }} 155 156 {{ template "repo/issues/fragments/newComment" . }} 157 <div> 158{{ end }}