this repo has no description
1{{ define "user/fragments/repoCard" }}
2 {{ $root := index . 0 }}
3 {{ $repo := index . 1 }}
4 {{ $fullName := index . 2 }}
5
6 {{ with $repo }}
7 <div class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800">
8 <div class="font-medium dark:text-white flex gap-2 items-center">
9 {{- if $fullName -}}
10 <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}">{{ index $root.DidHandleMap .Did }}/{{ .Name }}</a>
11 {{- else -}}
12 <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}">{{ .Name }}</a>
13 {{- end -}}
14 </div>
15 {{ with .Description }}
16 <div class="text-gray-600 dark:text-gray-300 text-sm">
17 {{ . }}
18 </div>
19 {{ end }}
20
21 {{ if .RepoStats }}
22 {{ block "repoStats" .RepoStats }} {{ end }}
23 {{ end }}
24 </div>
25 {{ end }}
26{{ end }}
27
28{{ define "repoStats" }}
29 <div class="text-gray-400 pt-4 text-sm font-mono inline-flex gap-4 mt-auto">
30 {{ with .Language }}
31 <div class="flex gap-2 items-center text-sm">
32 <div class="size-2 rounded-full" style="background-color: {{ langColor . }};"></div>
33 <span>{{ . }}</span>
34 </div>
35 {{ end }}
36 {{ with .StarCount }}
37 <div class="flex gap-1 items-center text-sm">
38 {{ i "star" "w-3 h-3 fill-current" }}
39 <span>{{ . }}</span>
40 </div>
41 {{ end }}
42 {{ with .IssueCount.Open }}
43 <div class="flex gap-1 items-center text-sm">
44 {{ i "circle-dot" "w-3 h-3" }}
45 <span>{{ . }}</span>
46 </div>
47 {{ end }}
48 {{ with .PullCount.Open }}
49 <div class="flex gap-1 items-center text-sm">
50 {{ i "git-pull-request" "w-3 h-3" }}
51 <span>{{ . }}</span>
52 </div>
53 {{ end }}
54 </div>
55{{ end }}
56
57