diff --git a/appview/pages/templates/search/fragments/quick.html b/appview/pages/templates/search/fragments/quick.html --- a/appview/pages/templates/search/fragments/quick.html +++ b/appview/pages/templates/search/fragments/quick.html @@ -30,41 +30,8 @@ {{end}} {{define "search/fragments/quickPage"}} {{- range .Repos -}} - {{ template "search/fragments/quickItem" . }} + {{ template "user/fragments/repoCard" (list $ . true false (dict) true) }} {{- end -}} -{{end}} - -{{define "search/fragments/quickItem"}} -{{ $owner := resolve .Did }} - -
- {{ i "book-marked" "size-4 pt-0.5 text-gray-400" }} - {{ $owner }}/{{ .Name }} -
- {{- with .Description -}} -
{{ . }}
- {{- end -}} - {{- with .RepoStats -}} - {{- if or .Language .StarCount .IssueCount.Open .PullCount.Open -}} -
- {{- with .Language -}} - {{ template "repo/fragments/colorBall" (dict "color" (langColor .)) }}{{ . }} - {{- end -}} - {{- with .StarCount -}} - {{ i "star" "w-3 h-3" }} {{ . }} - {{- end -}} - {{- with .IssueCount.Open -}} - {{ i "circle-dot" "w-3 h-3" }} {{ . }} - {{- end -}} - {{- with .PullCount.Open -}} - {{ i "git-pull-request" "w-3 h-3" }} {{ . }} - {{- end -}} -
- {{- end -}} - {{- end -}} -
{{end}} {{define "search/fragments/quickFooter"}} diff --git a/appview/pages/templates/user/fragments/repoCard.html b/appview/pages/templates/user/fragments/repoCard.html --- a/appview/pages/templates/user/fragments/repoCard.html +++ b/appview/pages/templates/user/fragments/repoCard.html @@ -5,15 +5,19 @@ {{ $repo := index . 1 }} {{ $fullName := index . 2 }} {{ $starButton := false }} {{ $starData := dict }} + {{ $compact := false }} {{ if gt (len .) 3 }} {{ $starButton = index . 3 }} {{ if gt (len .) 4 }} {{ $starData = index . 4 }} + {{ if gt (len .) 5 }} + {{ $compact = index . 5 }} + {{ end }} {{ end }} {{ end }} {{ with $repo }} -
+
{{ if .Source }} @@ -23,9 +27,9 @@ {{ i "book-marked" "w-4 h-4 mr-1.5 shrink-0" }} {{ end }} {{ $repoOwner := resolve .Did }} {{- if $fullName -}} - {{ $repoOwner }}/{{ .Name }} + {{ $repoOwner }}/{{ .Name }} {{- else -}} - {{ .Name }} + {{ .Name }} {{- end -}}
{{ if and $starButton $root.LoggedInUser }}