{{ define "title" }}{{ .Issue.Title }} · Issue #{{ .Issue.IssueId }} · {{ .RepoInfo.FullName }} · Tangled{{ end }} {{ define "extrameta" }} {{ template "repo/issues/fragments/og" (dict "RepoInfo" .RepoInfo "Issue" .Issue) }} {{ end }} {{ define "repoContentLayout" }}
{{ block "repoContent" . }}{{ end }}
{{ block "repoAfter" . }}{{ end }}
{{ template "repo/fragments/labelPanel" (dict "RepoInfo" $.RepoInfo "Defs" $.LabelDefs "Subject" $.Issue.AtUri "State" $.Issue.Labels) }} {{ template "repo/fragments/participants" $.Issue.Participants }} {{ template "repo/fragments/backlinks" (dict "RepoInfo" $.RepoInfo "Backlinks" $.Backlinks) }} {{ template "repo/fragments/externalLinkPanel" $.Issue.AtUri }}
{{ end }} {{ define "repoContent" }}
{{ template "issueHeader" .Issue }} {{ template "issueInfo" . }} {{ if .Issue.Body }}
{{ .Issue.Body | markdown }}
{{ end }}
{{ $aturi := .Issue.AtUri }} {{ template "repo/fragments/reactions" (dict "Reactions" (index .Reactions $aturi) "UserReacted" (index .UserReacted $aturi) "ThreadAt" $aturi) }}
{{ end }} {{ define "issueHeader" }}

{{ .Title | description }} #{{ .IssueId }}

{{ end }} {{ define "issueInfo" }} {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} {{ $icon := "ban" }} {{ if eq .Issue.State "open" }} {{ $bgColor = "bg-green-600 dark:bg-green-700" }} {{ $icon = "circle-dot" }} {{ end }}
{{ i $icon "w-3 h-3 mr-1.5 text-white dark:text-white" }} {{ if eq .Issue.State "open" }}Open{{ else }}Closed{{ end }} opened by {{ template "user/fragments/picLink" (list .Issue.Did "size-6" (index .VouchRelationships (did .Issue.Did))) }} {{ resolve .Issue.Did }} {{ if .Issue.Edited }} edited {{ template "repo/fragments/time" .Issue.Edited }} {{ else }} {{ template "repo/fragments/time" .Issue.Created }} {{ end }} {{ if and .LoggedInUser (eq .LoggedInUser.Did .Issue.Did) }}
{{ template "issueActions" . }}
{{ end }}
{{ end }} {{ define "issueActions" }} {{ template "editIssue" . }} {{ template "deleteIssue" . }} {{ end }} {{ define "editIssue" }} {{ i "pencil" "size-3" }} {{ end }} {{ define "deleteIssue" }} {{ i "trash-2" "size-3 inline group-[.htmx-request]:hidden" }} {{ i "loader-circle" "size-3 animate-spin hidden group-[.htmx-request]:inline" }} {{ end }} {{ define "repoAfter" }}
{{ template "fragments/comment/commentList" (dict "LoggedInUser" $.LoggedInUser "Reactions" $.Reactions "UserReacted" $.UserReacted "VouchRelationships" $.VouchRelationships "CommentList" $.CommentList) }} {{ template "repo/issues/fragments/newComment" . }}
{{ end }}