this repo has no description
1{{ define "title" }}issues · {{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "repoContent" }}
4<div class="flex justify-between items-center gap-4">
5 <div class="flex gap-4">
6 <a
7 href="?state=open"
8 class="flex items-center gap-2 {{ if .FilteringByOpen }}font-bold {{ else }}text-gray-500 dark:text-gray-400{{ end }}"
9 >
10 {{ i "circle-dot" "w-4 h-4" }}
11 <span>{{ .RepoInfo.Stats.IssueCount.Open }} open</span>
12 </a>
13 <a
14 href="?state=closed"
15 class="flex items-center gap-2 {{ if not .FilteringByOpen }}font-bold {{ else }}text-gray-500 dark:text-gray-400{{ end }}"
16 >
17 {{ i "ban" "w-4 h-4" }}
18 <span>{{ .RepoInfo.Stats.IssueCount.Closed }} closed</span>
19 </a>
20 </div>
21 <a
22 href="/{{ .RepoInfo.FullName }}/issues/new"
23 class="btn text-sm flex items-center justify-center gap-2 no-underline hover:no-underline"
24 >
25 {{ i "circle-plus" "w-4 h-4" }}
26 <span>new</span>
27 </a>
28</div>
29<div class="error" id="issues"></div>
30{{ end }}
31
32{{ define "repoAfter" }}
33<div class="flex flex-col gap-2 mt-2">
34 {{ range .Issues }}
35 <div class="rounded drop-shadow-sm bg-white px-6 py-4 dark:bg-gray-800 dark:border-gray-700">
36 <div class="pb-2">
37 <a
38 href="/{{ $.RepoInfo.FullName }}/issues/{{ .IssueId }}"
39 class="no-underline hover:underline"
40 >
41 {{ .Title }}
42 <span class="text-gray-500">#{{ .IssueId }}</span>
43 </a>
44 </div>
45 <p class="text-sm text-gray-500 dark:text-gray-400">
46 {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }}
47 {{ $icon := "ban" }}
48 {{ $state := "closed" }}
49 {{ if .Open }}
50 {{ $bgColor = "bg-green-600 dark:bg-green-700" }}
51 {{ $icon = "circle-dot" }}
52 {{ $state = "open" }}
53 {{ end }}
54
55 <span class="inline-flex items-center rounded px-2 py-[5px] {{ $bgColor }} text-sm">
56 {{ i $icon "w-3 h-3 mr-1.5 text-white dark:text-white" }}
57 <span class="text-white dark:text-white">{{ $state }}</span>
58 </span>
59
60 <span>
61 {{ $owner := index $.DidHandleMap .OwnerDid }}
62 <a href="/{{ $owner }}">{{ $owner }}</a>
63 </span>
64
65 <span class="before:content-['·']">
66 <time>
67 {{ .Created | timeFmt }}
68 </time>
69 </span>
70
71 <span class="before:content-['·']">
72 {{ $s := "s" }}
73 {{ if eq .Metadata.CommentCount 1 }}
74 {{ $s = "" }}
75 {{ end }}
76 <a href="/{{ $.RepoInfo.FullName }}/issues/{{ .IssueId }}" class="text-gray-500 dark:text-gray-400">{{ .Metadata.CommentCount }} comment{{$s}}</a>
77 </span>
78 </p>
79 </div>
80 {{ end }}
81</div>
82
83{{ block "pagination" . }} {{ end }}
84
85{{ end }}
86
87{{ define "pagination" }}
88<div class="flex justify-end mt-4 gap-2">
89 {{ $currentState := "closed" }}
90 {{ if .FilteringByOpen }}
91 {{ $currentState = "open" }}
92 {{ end }}
93
94 {{ if gt .Page.Offset 0 }}
95 {{ $prev := .Page.Previous }}
96 <a
97 class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700"
98 hx-boost="true"
99 href = "/{{ $.RepoInfo.FullName }}/issues?state={{ $currentState }}&offset={{ $prev.Offset }}&limit={{ $prev.Limit }}"
100 >
101 {{ i "chevron-left" "w-4 h-4" }}
102 previous
103 </a>
104 {{ else }}
105 <div></div>
106 {{ end }}
107
108 {{ if eq (len .Issues) .Page.Limit }}
109 {{ $next := .Page.Next }}
110 <a
111 class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700"
112 hx-boost="true"
113 href = "/{{ $.RepoInfo.FullName }}/issues?state={{ $currentState }}&offset={{ $next.Offset }}&limit={{ $next.Limit }}"
114 >
115 next
116 {{ i "chevron-right" "w-4 h-4" }}
117 </a>
118 {{ end }}
119</div>
120{{ end }}