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 }}" 11 >{{ index $root.DidHandleMap .Did }}/{{ .Name }}</a 12 > 13 {{- else -}} 14 <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}" 15 >{{ .Name }}</a 16 > 17 {{- end -}} 18 </div> 19 {{ if .Source }} 20 <div class="flex items-center my-0.5 text-sm"> 21 {{ i "git-fork" "w-3 h-3 mr-1" }} 22 fork 23 </div> 24 {{ end }} 25 {{ with .Description }} 26 <div class="text-gray-600 dark:text-gray-300 text-sm"> 27 {{ . }} 28 </div> 29 {{ end }} 30 31 {{ if .RepoStats }} 32 {{ block "repoStats" .RepoStats }}{{ end }} 33 {{ end }} 34 </div> 35 {{ end }} 36{{ end }} 37 38{{ define "repoStats" }} 39 <div class="text-gray-400 pt-4 text-sm font-mono inline-flex gap-4 mt-auto"> 40 {{ with .Language }} 41 <div class="flex gap-2 items-center text-sm"> 42 <div 43 class="size-2 rounded-full" 44 style="background: radial-gradient(circle at 35% 35%, color-mix(in srgb, {{ langColor . }} 70%, white), {{ langColor . }} 30%, color-mix(in srgb, {{ langColor . }} 85%, black));" 45 ></div> 46 <span>{{ . }}</span> 47 </div> 48 {{ end }} 49 {{ with .StarCount }} 50 <div class="flex gap-1 items-center text-sm"> 51 {{ i "star" "w-3 h-3 fill-current" }} 52 <span>{{ . }}</span> 53 </div> 54 {{ end }} 55 {{ with .IssueCount.Open }} 56 <div class="flex gap-1 items-center text-sm"> 57 {{ i "circle-dot" "w-3 h-3" }} 58 <span>{{ . }}</span> 59 </div> 60 {{ end }} 61 {{ with .PullCount.Open }} 62 <div class="flex gap-1 items-center text-sm"> 63 {{ i "git-pull-request" "w-3 h-3" }} 64 <span>{{ . }}</span> 65 </div> 66 {{ end }} 67 </div> 68{{ end }}