diff --git a/appview/pages/templates/layouts/repobase.html b/appview/pages/templates/layouts/repobase.html index d3347664..c5d31bf5 100644 --- a/appview/pages/templates/layouts/repobase.html +++ b/appview/pages/templates/layouts/repobase.html @@ -2,74 +2,20 @@ {{ define "content" }}
-
- +
- -
- {{ template "user/fragments/picHandleLink" .RepoInfo.OwnerDid }} - / - {{ .RepoInfo.Name }} -
- - {{ if .RepoInfo.Source }} - {{ $sourceOwner := resolve .RepoInfo.Source.Did }} -
- {{ i "git-fork" "w-3 h-3 shrink-0" }} - forked from - - {{ $sourceOwner }}/{{ .RepoInfo.Source.Name }} - -
- {{ end }} - - - {{ if .RepoInfo.Description }} - {{ .RepoInfo.Description | description }} - {{ else }} - this repo has no description - {{ end }} - - {{ with .RepoInfo.Website }} - - {{ i "globe" "size-4" }} - {{ . | trimUriScheme }} - - {{ end }} - - {{ if .RepoInfo.Topics }} -
- {{ range .RepoInfo.Topics }} - {{ . }} - {{ end }} -
- {{ end }} - -
+ {{ template "repoOwnerAndName" . }} + {{ template "repoForkInfo" . }}
- -
- {{ template "fragments/starBtn" - (dict "SubjectAt" .RepoInfo.RepoAt - "IsStarred" .RepoInfo.IsStarred - "StarCount" .RepoInfo.Stats.StarCount) }} - - {{ i "git-fork" "w-4 h-4" }} - fork - {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} - - - {{ i "rss" "size-4" }} - atom - +
+ {{ template "repoMetadata" . }} + +
+ {{ template "repoActions" . }} +
@@ -117,3 +63,73 @@ {{ end }}
{{ end }} + +{{ define "repoOwnerAndName" }} +
+ {{ template "user/fragments/picHandleLink" .RepoInfo.OwnerDid }} + / + {{ .RepoInfo.Name }} +
+{{ end }} + +{{ define "repoForkInfo" }} + {{ if .RepoInfo.Source }} + {{ $sourceOwner := resolve .RepoInfo.Source.Did }} +
+ {{ i "git-fork" "w-3 h-3 shrink-0" }} + forked from + + {{ $sourceOwner }}/{{ .RepoInfo.Source.Name }} + +
+ {{ end }} +{{ end }} + +{{ define "repoMetadata" }} +
+ {{ if .RepoInfo.Description }} + {{ .RepoInfo.Description | description }} + {{ else }} + this repo has no description + {{ end }} + + {{ with .RepoInfo.Website }} + + {{ i "globe" "size-4" }} + {{ . | trimUriScheme }} + + {{ end }} + + {{ if .RepoInfo.Topics }} +
+ {{ range .RepoInfo.Topics }} + {{ . }} + {{ end }} +
+ {{ end }} +
+{{ end }} + +{{ define "repoActions" }} +
+ {{ template "fragments/starBtn" + (dict "SubjectAt" .RepoInfo.RepoAt + "IsStarred" .RepoInfo.IsStarred + "StarCount" .RepoInfo.Stats.StarCount) }} + + {{ i "git-fork" "w-4 h-4" }} + fork + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} + + + {{ i "rss" "size-4" }} + atom + +
+{{ end }}