Monorepo for Tangled
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 := .FilterState }}
12
13 {{ $open :=
14 (dict
15 "Key" "open"
16 "Value" "open"
17 "Icon" "circle-dot"
18 "Meta" (string .RepoInfo.Stats.IssueCount.Open)) }}
19 {{ $closed :=
20 (dict
21 "Key" "closed"
22 "Value" "closed"
23 "Icon" "ban"
24 "Meta" (string .RepoInfo.Stats.IssueCount.Closed)) }}
25 {{ $values := list $open $closed }}
26
27 <div class="grid gap-2 grid-cols-[auto_1fr_auto] grid-row-2">
28 <form id="search-form" class="flex relative col-span-3 sm:col-span-1 sm:col-start-2" method="GET">
29 <div class="flex-1 flex relative">
30 <input
31 id="search-q"
32 class="flex-1 py-1 pl-2 pr-10 mr-[-1px] rounded-r-none peer"
33 type="text"
34 name="q"
35 value="{{ .FilterQuery }}"
36 placeholder="search issues..."
37 >
38 <a
39 {{ if $active }}href="?q=state:{{ $active }}"{{ else }}href="?"{{ end }}
40 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"
41 >
42 {{ i "x" "w-4 h-4" }}
43 </a>
44 </div>
45 <button
46 type="submit"
47 class="p-2 text-gray-400 border rounded-r border-gray-300 dark:border-gray-600"
48 >
49 {{ i "search" "w-4 h-4" }}
50 </button>
51 </form>
52 <div class="sm:row-start-1">
53 {{ template "fragments/tabSelector" (dict "Name" "state" "Values" $values "Active" $active "Include" "#search-q" "Form" "search-form") }}
54 </div>
55 <a
56 href="/{{ .RepoInfo.FullName }}/issues/new"
57 class="col-start-3 btn-create text-sm flex items-center justify-center gap-2 no-underline hover:no-underline hover:text-white"
58 >
59 {{ i "circle-plus" "w-4 h-4" }}
60 <span>new</span>
61 </a>
62 </div>
63 <div class="error" id="issues"></div>
64{{ end }}
65
66{{ define "repoAfter" }}
67 <div class="mt-2">
68 {{ template "repo/issues/fragments/issueListing" (dict "Issues" .Issues "RepoPrefix" .RepoInfo.FullName "LabelDefs" .LabelDefs) }}
69 </div>
70 {{if gt .IssueCount .Page.Limit }}
71 {{ template "fragments/pagination" (dict
72 "Page" .Page
73 "TotalCount" .IssueCount
74 "BasePath" (printf "/%s/issues" .RepoInfo.FullName)
75 "QueryParams" (queryParams "q" .FilterQuery)
76 ) }}
77 {{ end }}
78{{ end }}