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"
33 style="background: radial-gradient(circle at 35% 35%, color-mix(in srgb, {{ langColor . }} 70%, white), {{ langColor . }} 30%, color-mix(in srgb, {{ langColor . }} 85%, black));"></div>
34 <span>{{ . }}</span>
35 </div>
36 {{ end }}
37 {{ with .StarCount }}
38 <div class="flex gap-1 items-center text-sm">
39 {{ i "star" "w-3 h-3 fill-current" }}
40 <span>{{ . }}</span>
41 </div>
42 {{ end }}
43 {{ with .IssueCount.Open }}
44 <div class="flex gap-1 items-center text-sm">
45 {{ i "circle-dot" "w-3 h-3" }}
46 <span>{{ . }}</span>
47 </div>
48 {{ end }}
49 {{ with .PullCount.Open }}
50 <div class="flex gap-1 items-center text-sm">
51 {{ i "git-pull-request" "w-3 h-3" }}
52 <span>{{ . }}</span>
53 </div>
54 {{ end }}
55 </div>
56{{ end }}
57
58