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