{{ define "title" }}issues · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} {{ $title := "issues"}} {{ $url := printf "https://tangled.sh/%s/issues" .RepoInfo.FullName }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }}
{{ i "circle-dot" "w-4 h-4" }} {{ .RepoInfo.Stats.IssueCount.Open }} open {{ i "ban" "w-4 h-4" }} {{ .RepoInfo.Stats.IssueCount.Closed }} closed
{{ i "circle-plus" "w-4 h-4" }} new
{{ end }} {{ define "repoAfter" }}
{{ range .Issues }}

{{ $bgColor := "bg-gray-800 dark:bg-gray-700" }} {{ $icon := "ban" }} {{ $state := "closed" }} {{ if .Open }} {{ $bgColor = "bg-green-600 dark:bg-green-700" }} {{ $icon = "circle-dot" }} {{ $state = "open" }} {{ end }} {{ i $icon "w-3 h-3 mr-1.5 text-white dark:text-white" }} {{ $state }} {{ $owner := index $.DidHandleMap .OwnerDid }} {{ $owner }} {{ $s := "s" }} {{ if eq .Metadata.CommentCount 1 }} {{ $s = "" }} {{ end }} {{ .Metadata.CommentCount }} comment{{$s}}

{{ end }}
{{ block "pagination" . }} {{ end }} {{ end }} {{ define "pagination" }}
{{ $currentState := "closed" }} {{ if .FilteringByOpen }} {{ $currentState = "open" }} {{ end }} {{ if gt .Page.Offset 0 }} {{ $prev := .Page.Previous }} {{ i "chevron-left" "w-4 h-4" }} previous {{ else }}
{{ end }} {{ if eq (len .Issues) .Page.Limit }} {{ $next := .Page.Next }} next {{ i "chevron-right" "w-4 h-4" }} {{ end }}
{{ end }}