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-5 gap-6">
5 <div class="md:col-span-1 order-1 md:order-1">
6 {{ block "profileCard" . }}{{ end }}
7 </div>
8 <div class="md:col-span-2 order-2 md:order-2">
9 {{ block "ownRepos" . }}{{ end }}
10 {{ block "collaboratingRepos" . }}{{ end }}
11 </div>
12
13 <div class="md:col-span-2 order-3 md:order-3">
14 {{ block "profileTimeline" . }}{{ end }}
15 </div>
16</div>
17{{ end }}
18
19
20
21{{ define "profileTimeline" }}
22 <div class="flex flex-col gap-3 relative">
23 <p class="px-6 text-sm font-bold py-2 dark:text-white">ACTIVITY</p>
24 {{ range .ProfileTimeline }}
25 {{ if eq .Type "issue" }}
26 <div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit max-w-full flex items-center gap-2">
27 {{ $textColor := "text-gray-800 dark:text-gray-700" }}
28 {{ $icon := "ban" }}
29 {{ if .Issue.Open }}
30 {{ $textColor = "text-green-600 dark:text-green-700" }}
31 {{ $icon = "circle-dot" }}
32 {{ end }}
33 <div class="p-1 {{ $textColor }}">
34 {{ i $icon "w-5 h-5" }}
35 </div>
36 <div>
37 <p class="text-gray-600 dark:text-gray-300">
38 <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}/issues/{{ .Issue.IssueId }}" class="no-underline hover:underline">{{ .Issue.Title }} <span class="text-gray-500 dark:text-gray-400">#{{ .Issue.IssueId }}</span></a>
39 on
40 <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}" class="no-underline hover:underline">{{ index $.DidHandleMap .Repo.Did }}<span class="select-none">/</span>{{ .Repo.Name }}</a>
41 <time class="text-gray-700 dark:text-gray-400 text-xs ml-2">{{ .Repo.Created | shortTimeFmt }}</time>
42 </p>
43 </div>
44 </div>
45 {{ else if eq .Type "pull" }}
46 <div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit flex items-center gap-3">
47 {{ $textColor := "text-gray-800 dark:text-gray-700" }}
48 {{ $icon := "git-pull-request-closed" }}
49 {{ if .Pull.State.IsOpen }}
50 {{ $textColor = "text-green-600 dark:text-green-700" }}
51 {{ $icon = "git-pull-request" }}
52 {{ else if .Pull.State.IsMerged }}
53 {{ $textColor = "text-purple-600 dark:text-purple-700" }}
54 {{ $icon = "git-merge" }}
55 {{ end }}
56 <div class="{{ $textColor }} p-1">
57 {{ i $icon "w-5 h-5" }}
58 </div>
59 <div>
60 <p class="text-gray-600 dark:text-gray-300">
61 <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}/pulls/{{ .Pull.PullId }}" class="no-underline hover:underline">{{ .Pull.Title }} <span class="text-gray-500 dark:text-gray-400">#{{ .Pull.PullId }}</span></a>
62 on
63 <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}" class="no-underline hover:underline">
64 {{ index $.DidHandleMap .Repo.Did }}<span class="select-none">/</span>{{ .Repo.Name }}</a>
65 <time class="text-gray-700 dark:text-gray-400 text-xs ml-2">{{ .Repo.Created | shortTimeFmt }}</time>
66 </p>
67 </div>
68 </div>
69 {{ else if eq .Type "repo" }}
70 <div class="px-6 py-2 bg-white dark:bg-gray-800 rounded drop-shadow-sm w-fit flex items-center gap-3">
71 <div class="text-black dark:text-white p-1">
72 {{ i "book-plus" "w-5 h-5" }}
73 </div>
74 <div>
75 <p class="text-gray-600 dark:text-gray-300">
76 created <a href="/{{ index $.DidHandleMap .Repo.Did }}/{{ .Repo.Name }}" class="no-underline hover:underline">{{ .Repo.Name }}</a>
77 <time class="text-gray-700 dark:text-gray-400 text-xs ml-2">{{ .Repo.Created | shortTimeFmt }}</time>
78 </p>
79 </div>
80 </div>
81 {{ end }}
82 {{ end }}
83 </div>
84{{ end }}
85
86{{ define "profileCard" }}
87 <div class="bg-white dark:bg-gray-800 px-6 py-4 rounded drop-shadow-sm max-h-fit">
88 <div class="flex justify-center items-center">
89 {{ if .AvatarUri }}
90 <img class="w-3/4 rounded-full p-2" src="{{ .AvatarUri }}" />
91 {{ end }}
92 </div>
93 <p class="text-xl font-bold text-center dark:text-white">
94 {{ truncateAt30 (didOrHandle .UserDid .UserHandle) }}
95 </p>
96 <div class="text-sm text-center dark:text-gray-300">
97 <span>{{ .ProfileStats.Followers }} followers</span>
98 <div
99 class="inline-block px-1 select-none after:content-['·']"
100 ></div>
101 <span>{{ .ProfileStats.Following }} following</span>
102 </div>
103
104 {{ if ne .FollowStatus.String "IsSelf" }}
105 {{ template "fragments/follow" . }}
106 {{ end }}
107 </div>
108{{ end }}
109
110{{ define "ownRepos" }}
111 <p class="text-sm font-bold py-2 px-6 dark:text-white">REPOS</p>
112 <div id="repos" class="grid grid-cols-1 gap-4 mb-6">
113 {{ range .Repos }}
114 <div
115 id="repo-card"
116 class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800"
117 >
118 <div id="repo-card-name" class="font-medium dark:text-white">
119 <a href="/@{{ or $.UserHandle $.UserDid }}/{{ .Name }}"
120 >{{ .Name }}</a
121 >
122 </div>
123 {{ if .Description }}
124 <div class="text-gray-600 dark:text-gray-300 text-sm">
125 {{ .Description }}
126 </div>
127 {{ end }}
128 <div
129 class="text-gray-400 pt-1 text-sm font-mono inline-flex gap-4 mt-auto"
130 >
131
132 {{ if .RepoStats.StarCount }}
133 <div class="flex gap-1 items-center text-sm">
134 {{ i "star" "w-3 h-3 fill-current" }}
135 <span>{{ .RepoStats.StarCount }}</span>
136 </div>
137 {{ end }}
138 </div>
139 </div>
140 {{ else }}
141 <p class="px-6 dark:text-white">This user does not have any repos yet.</p>
142 {{ end }}
143 </div>
144
145 <p class="text-sm font-bold py-2 px-6 dark:text-white">COLLABORATING ON</p>
146 <div id="collaborating" class="grid grid-cols-1 gap-4 mb-6">
147 {{ range .CollaboratingRepos }}
148 <div
149 id="repo-card"
150 class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800 flex flex-col"
151 >
152 <div id="repo-card-name" class="font-medium dark:text-white">
153 <a href="/{{ index $.DidHandleMap .Did }}/{{ .Name }}">
154 {{ index $.DidHandleMap .Did }}/{{ .Name }}
155 </a>
156 </div>
157 {{ if .Description }}
158 <div class="text-gray-600 dark:text-gray-300 text-sm">
159 {{ .Description }}
160 </div>
161 {{ end }}
162 <div class="text-gray-400 pt-1 text-sm font-mono inline-flex gap-4 mt-auto">
163
164 {{ if .RepoStats.StarCount }}
165 <div class="flex gap-1 items-center text-sm">
166 {{ i "star" "w-3 h-3 fill-current" }}
167 <span>{{ .RepoStats.StarCount }}</span>
168 </div>
169 {{ end }}
170 </div>
171 </div>
172 {{ else }}
173 <p class="px-6 dark:text-white">This user is not collaborating.</p>
174 {{ end }}
175 </div>
176{{ end }}