{{ define "title" }}{{ .Issue.Title }} · issue #{{ .Issue.IssueId }} ·{{ .RepoInfo.FullName }}{{ end }} {{ define "repoContent" }}

{{ .Issue.Title }} #{{ .Issue.IssueId }}

{{ $bgColor := "bg-gray-800" }} {{ $icon := "ban" }} {{ if eq .State "open" }} {{ $bgColor = "bg-green-600" }} {{ $icon = "circle-dot" }} {{ end }}
{{ .State }}
opened by {{ $owner := didOrHandle .Issue.OwnerDid .IssueOwnerHandle }} {{ $owner }}
{{ if .Issue.Body }}
{{ .Issue.Body | markdown }}
{{ end }}
{{ end }} {{ define "repoAfter" }}
{{ range $index, $comment := .Comments }}
{{ if eq $index 0 }}
{{ else }}
{{ end }}
{{ $owner := index $.DidHandleMap .OwnerDid }} {{ $owner }} {{ .Created | timeFmt }}
{{ .Body | markdown }}
{{ end }}
{{ if .LoggedInUser }}
{{ end }} {{ $isIssueAuthor := eq .LoggedInUser.Did .Issue.OwnerDid }} {{ $isRepoCollaborator := .RepoInfo.Roles.IsCollaborator }} {{ if or $isIssueAuthor $isRepoCollaborator }} {{ $action := "close" }} {{ $icon := "circle-x" }} {{ $hoverColor := "red" }} {{ if eq .State "closed" }} {{ $action = "reopen" }} {{ $icon = "circle-dot" }} {{ $hoverColor = "green" }} {{ end }}
{{ end }} {{ end }}