From ac6651cf1690958783506f269e4f5fc88c3c786e Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 12 Aug 2025 12:50:22 +0300 Subject: [PATCH] appview: ui: add fork indicator to repoCard adds a fork indicator to the repo lists in the profile, if repo is forked Signed-off-by: Samuel Newman --- .../templates/user/fragments/repoCard.html | 70 +++++++++++-------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/appview/pages/templates/user/fragments/repoCard.html b/appview/pages/templates/user/fragments/repoCard.html index 9bab85b..fd33672 100644 --- a/appview/pages/templates/user/fragments/repoCard.html +++ b/appview/pages/templates/user/fragments/repoCard.html @@ -5,22 +5,32 @@ {{ with $repo }}
-
- {{- if $fullName -}} - {{ index $root.DidHandleMap .Did }}/{{ .Name }} - {{- else -}} - {{ .Name }} - {{- end -}} +
+ {{- if $fullName -}} + {{ index $root.DidHandleMap .Did }}/{{ .Name }} + {{- else -}} + {{ .Name }} + {{- end -}} +
+ {{ if .Source }} +
+ {{ i "git-fork" "w-3 h-3 mr-1" }} + fork +
+ {{ end }} + {{ with .Description }} +
+ {{ . }}
- {{ with .Description }} -
- {{ . }} -
- {{ end }} + {{ end }} - {{ if .RepoStats }} - {{ block "repoStats" .RepoStats }} {{ end }} - {{ end }} + {{ if .RepoStats }} + {{ block "repoStats" .RepoStats }}{{ end }} + {{ end }}
{{ end }} {{ end }} @@ -29,30 +39,30 @@
{{ with .Language }}
-
+
{{ . }}
{{ end }} {{ with .StarCount }} -
- {{ i "star" "w-3 h-3 fill-current" }} - {{ . }} -
+
+ {{ i "star" "w-3 h-3 fill-current" }} + {{ . }} +
{{ end }} {{ with .IssueCount.Open }} -
- {{ i "circle-dot" "w-3 h-3" }} - {{ . }} -
+
+ {{ i "circle-dot" "w-3 h-3" }} + {{ . }} +
{{ end }} {{ with .PullCount.Open }} -
- {{ i "git-pull-request" "w-3 h-3" }} - {{ . }} -
+
+ {{ i "git-pull-request" "w-3 h-3" }} + {{ . }} +
{{ end }}
{{ end }} - - -- 2.43.0 From 455c71d954b56d0aa22858f2aa70f13df3406cdd Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 13 Aug 2025 19:50:41 +0300 Subject: [PATCH] appview: ui: signify forks with icon, adjust layout non-forked repos show a book icon, forked repos show a fork icon Signed-off-by: Samuel Newman --- appview/pages/templates/layouts/repobase.html | 2 +- .../templates/user/fragments/repoCard.html | 23 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/appview/pages/templates/layouts/repobase.html b/appview/pages/templates/layouts/repobase.html index 9fdd77e..abc95fe 100644 --- a/appview/pages/templates/layouts/repobase.html +++ b/appview/pages/templates/layouts/repobase.html @@ -5,7 +5,7 @@ {{ if .RepoInfo.Source }}

- {{ i "git-fork" "w-3 h-3 mr-1"}} + {{ i "git-fork" "w-3 h-3 mr-1 shrink-0" }} forked from {{ $sourceOwner := didOrHandle .RepoInfo.Source.Did .RepoInfo.SourceHandle }} {{ $sourceOwner }}/{{ .RepoInfo.Source.Name }} diff --git a/appview/pages/templates/user/fragments/repoCard.html b/appview/pages/templates/user/fragments/repoCard.html index fd33672..15c786d 100644 --- a/appview/pages/templates/user/fragments/repoCard.html +++ b/appview/pages/templates/user/fragments/repoCard.html @@ -4,8 +4,13 @@ {{ $fullName := index . 2 }} {{ with $repo }} -
-
+
+
+ {{ if .Source }} + {{ i "git-fork" "w-4 h-4 mr-1.5 shrink-0" }} + {{ else }} + {{ i "book-marked" "w-4 h-4 mr-1.5 shrink-0" }} + {{ end }} {{- if $fullName -}} {{ index $root.DidHandleMap .Did }}/{{ .Name }} {{- end -}}
- {{ if .Source }} -
- {{ i "git-fork" "w-3 h-3 mr-1" }} - fork -
- {{ end }} {{ with .Description }}
{{ . }} @@ -36,13 +35,11 @@ {{ end }} {{ define "repoStats" }} -
+
{{ with .Language }}
-
+
{{ . }}
{{ end }} -- 2.43.0