this repo has no description
1{{ define "title" }}issues · {{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "extrameta" }}
4 {{ $title := "issues"}}
5 {{ $url := printf "https://tangled.org/%s/issues" .RepoInfo.FullName }}
6
7 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
8{{ end }}
9
10{{ define "repoContent" }}
11 {{ $active := "closed" }}
12 {{ if .FilteringByOpen }}
13 {{ $active = "open" }}
14 {{ end }}
15
16 {{ $open :=
17 (dict
18 "Key" "open"
19 "Value" "open"
20 "Icon" "circle-dot"
21 "Meta" (string .RepoInfo.Stats.IssueCount.Open)) }}
22 {{ $closed :=
23 (dict
24 "Key" "closed"
25 "Value" "closed"
26 "Icon" "ban"
27 "Meta" (string .RepoInfo.Stats.IssueCount.Closed)) }}
28 {{ $values := list $open $closed }}
29
30 <div class="grid gap-2 grid-cols-[auto_1fr_auto] grid-row-2">
31 <form class="flex relative col-span-3 sm:col-span-1 sm:col-start-2" method="GET">
32 <input type="hidden" name="state" value="{{ if .FilteringByOpen }}open{{ else }}closed{{ end }}">
33 <div class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 pointer-events-none">
34 {{ i "search" "w-4 h-4" }}
35 </div>
36 <input class="flex-1 p-1 pl-10 pr-10 peer" type="text" name="q" value="{{ .FilterQuery }}" placeholder=" ">
37 <a
38 href="?state={{ if .FilteringByOpen }}open{{ else }}closed{{ end }}"
39 class="absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 hidden peer-[:not(:placeholder-shown)]:block"
40 >
41 {{ i "x" "w-4 h-4" }}
42 </a>
43 </form>
44 <div class="sm:row-start-1">
45 {{ template "fragments/tabSelector" (dict "Name" "state" "Values" $values "Active" $active) }}
46 </div>
47 <a
48 href="/{{ .RepoInfo.FullName }}/issues/new"
49 class="col-start-3 btn-create text-sm flex items-center justify-center gap-2 no-underline hover:no-underline hover:text-white"
50 >
51 {{ i "circle-plus" "w-4 h-4" }}
52 <span>new</span>
53 </a>
54 </div>
55 <div class="error" id="issues"></div>
56{{ end }}
57
58{{ define "repoAfter" }}
59 <div class="mt-2">
60 {{ template "repo/issues/fragments/issueListing" (dict "Issues" .Issues "RepoPrefix" .RepoInfo.FullName "LabelDefs" .LabelDefs) }}
61 </div>
62 {{ block "pagination" . }} {{ end }}
63{{ end }}
64
65{{ define "pagination" }}
66<div class="flex justify-end mt-4 gap-2">
67 {{ $currentState := "closed" }}
68 {{ if .FilteringByOpen }}
69 {{ $currentState = "open" }}
70 {{ end }}
71
72 {{ if gt .Page.Offset 0 }}
73 {{ $prev := .Page.Previous }}
74 <a
75 class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700"
76 hx-boost="true"
77 href = "/{{ $.RepoInfo.FullName }}/issues?state={{ $currentState }}&q={{ .FilterQuery }}&offset={{ $prev.Offset }}&limit={{ $prev.Limit }}"
78 >
79 {{ i "chevron-left" "w-4 h-4" }}
80 previous
81 </a>
82 {{ else }}
83 <div></div>
84 {{ end }}
85
86 {{ if eq (len .Issues) .Page.Limit }}
87 {{ $next := .Page.Next }}
88 <a
89 class="btn flex items-center gap-2 no-underline hover:no-underline dark:text-white dark:hover:bg-gray-700"
90 hx-boost="true"
91 href = "/{{ $.RepoInfo.FullName }}/issues?state={{ $currentState }}&q={{ .FilterQuery }}&offset={{ $next.Offset }}&limit={{ $next.Limit }}"
92 >
93 next
94 {{ i "chevron-right" "w-4 h-4" }}
95 </a>
96 {{ end }}
97</div>
98{{ end }}