From 6d9dbf40ecc8b2e2ca98f019c17fd417039c50f1 Mon Sep 17 00:00:00 2001 From: leora Date: Thu, 15 Oct 2026 20:23:37 +0800 Subject: [PATCH] Explore: list .profile contact-card repos last (template override) --- .../custom/templates/explore/repo_list.tmpl | 138 ++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 config/custom/templates/explore/repo_list.tmpl diff --git a/config/custom/templates/explore/repo_list.tmpl b/config/custom/templates/explore/repo_list.tmpl new file mode 100644 index 0000000..826b267 --- /dev/null +++ b/config/custom/templates/explore/repo_list.tmpl @@ -0,0 +1,138 @@ +
+ {{/* seamtro: .profile contact-card repos listed last */}} + {{range .Repos}}{{if ne .Name ".profile"}} +
+
+ {{template "repo/icon" .}} +
+
+
+
+ {{if and (or $.PageIsExplore $.PageIsProfileStarList) .Owner}} + {{.Owner.Name}}/ + {{end}} + {{.Name}} + + {{if .IsArchived}} + {{ctx.Locale.Tr "repo.desc.archived"}} + {{end}} + {{if .IsPrivate}} + {{ctx.Locale.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{ctx.Locale.Tr "repo.desc.internal"}} + {{end}} + {{end}} + {{if .IsTemplate}} + {{ctx.Locale.Tr "repo.desc.template"}} + {{end}} + {{if eq .ObjectFormatName "sha256"}} + {{ctx.Locale.Tr "repo.desc.sha256"}} + {{end}} + +
+ +
+ {{$description := .DescriptionHTML ctx}} + {{if $description}} +
{{$description}}
+ {{end}} + {{if .Topics}} +
+ {{range .Topics}} + {{if ne . ""}}{{.}}{{end}} + {{end}} +
+ {{end}} +
{{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .UpdatedUnix}}
+
+
+ {{end}}{{end}} + {{range .Repos}}{{if eq .Name ".profile"}} +
+
+ {{template "repo/icon" .}} +
+
+
+
+ {{if and (or $.PageIsExplore $.PageIsProfileStarList) .Owner}} + {{.Owner.Name}}/ + {{end}} + {{.Name}} + + {{if .IsArchived}} + {{ctx.Locale.Tr "repo.desc.archived"}} + {{end}} + {{if .IsPrivate}} + {{ctx.Locale.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{ctx.Locale.Tr "repo.desc.internal"}} + {{end}} + {{end}} + {{if .IsTemplate}} + {{ctx.Locale.Tr "repo.desc.template"}} + {{end}} + {{if eq .ObjectFormatName "sha256"}} + {{ctx.Locale.Tr "repo.desc.sha256"}} + {{end}} + +
+ +
+ {{$description := .DescriptionHTML ctx}} + {{if $description}} +
{{$description}}
+ {{end}} + {{if .Topics}} +
+ {{range .Topics}} + {{if ne . ""}}{{.}}{{end}} + {{end}} +
+ {{end}} +
{{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .UpdatedUnix}}
+
+
+ {{end}}{{end}} + {{if not .Repos}} +
+ {{ctx.Locale.Tr "search.no_results"}} +
+ {{end}} +