appview: ui: add fork indicator to repoCard #472

merged
opened by samuel.fm targeting master from samuel.fm/core: samuel/fork-indicator

adds a fork indicator to the repo lists in the profile, if repo is forked. just the icon + the word "fork"

screenshot of the repo list

ideally this would have the source repo's name/author, but I don't quite understand how you'd thread that data down :/

Changed files
+1 -1
appview
pages
templates
layouts
+1 -1
appview/pages/templates/layouts/repobase.html
···
{{ if .RepoInfo.Source }}
<p class="text-sm">
<div class="flex items-center">
-
{{ i "git-fork" "w-3 h-3 mr-1"}}
forked from
{{ $sourceOwner := didOrHandle .RepoInfo.Source.Did .RepoInfo.SourceHandle }}
<a class="ml-1 underline" href="/{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}">{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}</a>
···
{{ if .RepoInfo.Source }}
<p class="text-sm">
<div class="flex items-center">
+
{{ i "git-fork" "w-3 h-3 mr-1 shrink-0" }}
forked from
{{ $sourceOwner := didOrHandle .RepoInfo.Source.Did .RepoInfo.SourceHandle }}
<a class="ml-1 underline" href="/{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}">{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}</a>