Signed-off-by: Anirudh Oppiliappan anirudh@tangled.sh
ERROR
appview/db/timeline.go
ERROR
appview/db/timeline.go
Failed to calculate interdiff for this file.
ERROR
appview/pages/templates/timeline/fragments/timeline.html
ERROR
appview/pages/templates/timeline/fragments/timeline.html
Failed to calculate interdiff for this file.
NEW
appview/pages/templates/user/fragments/repoCard.html
NEW
appview/pages/templates/user/fragments/repoCard.html
···
2
2
{{ $root := index . 0 }}
3
3
{{ $repo := index . 1 }}
4
4
{{ $fullName := index . 2 }}
5
+
{{ $starButton := false }}
6
+
{{ $starData := dict }}
7
+
{{ if gt (len .) 3 }}
8
+
{{ $starButton = index . 3 }}
9
+
{{ if gt (len .) 4 }}
10
+
{{ $starData = index . 4 }}
11
+
{{ end }}
12
+
{{ end }}
5
13
6
14
{{ with $repo }}
7
15
<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">
16
+
<div class="font-medium dark:text-white flex items-center justify-between">
17
+
<div class="flex items-center">
9
18
{{ if .Source }}
10
19
{{ i "git-fork" "w-4 h-4 mr-1.5 shrink-0" }}
11
20
{{ else }}
12
21
{{ i "book-marked" "w-4 h-4 mr-1.5 shrink-0" }}
13
22
{{ end }}
14
23
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 -}}
24
+
{{ $repoOwner := resolve .Did }}
25
+
{{- if $fullName -}}
26
+
<a href="/{{ $repoOwner }}/{{ .Name }}" class="truncate">{{ $repoOwner }}/{{ .Name }}</a>
27
+
{{- else -}}
28
+
<a href="/{{ $repoOwner }}/{{ .Name }}" class="truncate">{{ .Name }}</a>
29
+
{{- end -}}
30
+
</div>
31
+
32
+
{{ if and $starButton $root.LoggedInUser }}
33
+
{{ template "repo/fragments/repoStar" $starData }}
34
+
{{ end }}
21
35
</div>
22
36
{{ with .Description }}
23
37
<div class="text-gray-600 dark:text-gray-300 text-sm line-clamp-2">