this repo has no description
1{{ define "title" }}{{ or .UserHandle .UserDid }}{{ end }}
2
3{{ define "content" }}
4 <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
5 <div class="md:col-span-1">
6 {{ block "profileCard" . }}{{ end }}
7 </div>
8
9 <div class="md:col-span-3">
10 {{ block "ownRepos" . }}{{ end }}
11 {{ block "collaboratingRepos" . }}{{ end }}
12 </div>
13 </div>
14{{ end }}
15
16{{ define "profileCard" }}
17 <div class="bg-white dark:bg-gray-800 px-6 py-4 rounded drop-shadow-sm max-h-fit">
18 <div class="flex justify-center items-center">
19 {{ if .AvatarUri }}
20 <img class="w-1/2 rounded-full p-2" src="{{ .AvatarUri }}" />
21 {{ end }}
22 </div>
23 <p class="text-xl font-bold text-center dark:text-white">
24 {{ truncateAt30 (didOrHandle .UserDid .UserHandle) }}
25 </p>
26 <div class="text-sm text-center dark:text-gray-300">
27 <span>{{ .ProfileStats.Followers }} followers</span>
28 <div
29 class="inline-block px-1 select-none after:content-['·']"
30 ></div>
31 <span>{{ .ProfileStats.Following }} following</span>
32 </div>
33
34 {{ if ne .FollowStatus.String "IsSelf" }}
35 {{ template "fragments/follow" . }}
36 {{ end }}
37 </div>
38{{ end }}
39
40{{ define "ownRepos" }}
41 <p class="text-sm font-bold py-2 px-6 dark:text-white">REPOS</p>
42 <div id="repos" class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
43 {{ range .Repos }}
44 <div
45 id="repo-card"
46 class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800"
47 >
48 <div id="repo-card-name" class="font-medium dark:text-white">
49 <a href="/@{{ or $.UserHandle $.UserDid }}/{{ .Name }}"
50 >{{ .Name }}</a
51 >
52 </div>
53 {{ if .Description }}
54 <div class="text-gray-600 dark:text-gray-300 text-sm">
55 {{ .Description }}
56 </div>
57 {{ end }}
58 <div
59 class="text-gray-400 pt-1 text-sm font-mono inline-flex gap-4 mt-auto"
60 >
61
62 {{ if .RepoStats.StarCount }}
63 <div class="flex gap-1 items-center text-sm">
64 {{ i "star" "w-3 h-3 fill-current" }}
65 <span>{{ .RepoStats.StarCount }}</span>
66 </div>
67 {{ end }}
68 </div>
69 </div>
70 {{ else }}
71 <p class="px-6 dark:text-white">This user does not have any repos yet.</p>
72 {{ end }}
73 </div>
74{{ end }}
75
76{{ define "collaboratingRepos" }}
77 <p class="text-sm font-bold py-2 px-6 dark:text-white">COLLABORATING ON</p>
78 <div id="collaborating" class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
79 {{ range .CollaboratingRepos }}
80 <div
81 id="repo-card"
82 class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800 flex flex-col"
83 >
84 <div id="repo-card-name" class="font-medium dark:text-white">
85 <a href="/{{ index $.DidHandleMap .Did }}/{{ .Name }}">
86 {{ index $.DidHandleMap .Did }}/{{ .Name }}
87 </a>
88 </div>
89 {{ if .Description }}
90 <div class="text-gray-600 dark:text-gray-300 text-sm">
91 {{ .Description }}
92 </div>
93 {{ end }}
94 <div class="text-gray-400 pt-1 text-sm font-mono inline-flex gap-4 mt-auto">
95
96 {{ if .RepoStats.StarCount }}
97 <div class="flex gap-1 items-center text-sm">
98 {{ i "star" "w-3 h-3 fill-current" }}
99 <span>{{ .RepoStats.StarCount }}</span>
100 </div>
101 {{ end }}
102 </div>
103 </div>
104 {{ else }}
105 <p class="px-6 dark:text-white">This user is not collaborating.</p>
106 {{ end }}
107 </div>
108{{ end }}