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 gap-2 flex flex-col drop-shadow-sm rounded bg-white dark:bg-gray-800"> 8 <div class="font-medium dark:text-white flex items-center"> 9 {{ if .Source }} 10 {{ i "git-fork" "w-4 h-4 mr-1.5 shrink-0" }} 11 {{ else }} 12 {{ i "book-marked" "w-4 h-4 mr-1.5 shrink-0" }} 13 {{ end }} 14 {{- if $fullName -}} 15 <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}" 16 >{{ index $root.DidHandleMap .Did }}/{{ .Name }}</a 17 > 18 {{- else -}} 19 <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}" 20 >{{ .Name }}</a 21 > 22 {{- end -}} 23 </div> 24 {{ with .Description }} 25 <div class="text-gray-600 dark:text-gray-300 text-sm"> 26 {{ . }} 27 </div> 28 {{ end }} 29 30 {{ if .RepoStats }} 31 {{ block "repoStats" .RepoStats }}{{ end }} 32 {{ end }} 33 </div> 34 {{ end }} 35{{ end }} 36 37{{ define "repoStats" }} 38 <div class="text-gray-400 text-sm font-mono inline-flex gap-4 mt-auto"> 39 {{ with .Language }} 40 <div class="flex gap-2 items-center text-sm"> 41 <div class="size-2 rounded-full" 42 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> 43 <span>{{ . }}</span> 44 </div> 45 {{ end }} 46 {{ with .StarCount }} 47 <div class="flex gap-1 items-center text-sm"> 48 {{ i "star" "w-3 h-3 fill-current" }} 49 <span>{{ . }}</span> 50 </div> 51 {{ end }} 52 {{ with .IssueCount.Open }} 53 <div class="flex gap-1 items-center text-sm"> 54 {{ i "circle-dot" "w-3 h-3" }} 55 <span>{{ . }}</span> 56 </div> 57 {{ end }} 58 {{ with .PullCount.Open }} 59 <div class="flex gap-1 items-center text-sm"> 60 {{ i "git-pull-request" "w-3 h-3" }} 61 <span>{{ . }}</span> 62 </div> 63 {{ end }} 64 </div> 65{{ end }}