{{ define "title" }}forks · {{ .RepoInfo.FullName }}{{ end }}
  {{ define "repoContent" }}
  <div class="flex flex-col gap-4">
    <h2 class="text-sm uppercase font-bold">Forked by</h2>
    <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
      {{ range .Forks }}
        <div class="border border-gray-200 dark:border-gray-700 rounded p-4">
          {{ template "forkOwnerAndName" . }}
          <p class="text-sm text-gray-500 dark:text-gray-400">
            forked {{ .Created | relTimeFmt }}
          </p>
        </div>
      {{ end }}
      {{ if eq .TotalCount 0 }}
        <p class="text-gray-500 dark:text-gray-400 col-span-3">No forks yet.</p>
      {{ end }}
    </div>
    {{ if gt .TotalCount .Page.Limit }}
      {{ template "fragments/pagination" (dict
          "Page" .Page
          "TotalCount" .TotalCount
          "BasePath" (printf "/%s/forks" .RepoInfo.FullName)
          "QueryParams" (queryParams)
      ) }}
    {{ end }}
  </div>
{{ end }}

{{ define "forkOwnerAndName" }}
  <div class="flex items-center gap-1 flex-wrap text-lg">
    {{ template "user/fragments/picHandleLink" .Did }}
    <span class="select-none">/</span>
    {{ $repoOwner := resolve .Did }}
    <a href="/{{ $repoOwner }}/{{ .Name }}">{{ .Name }}</a>
  </div>
{{ end }}
