back interdiff of round #1 and #0

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 :/

files
appview
pages
templates
layouts
user
fragments
REVERTED
appview/pages/templates/user/fragments/repoCard.html
··· 5 5 6 6 {{ with $repo }} 7 7 <div class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800"> 8 + <div class="font-medium dark:text-white flex gap-2 items-center"> 9 + {{- if $fullName -}} 10 + <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}">{{ index $root.DidHandleMap .Did }}/{{ .Name }}</a> 11 + {{- else -}} 12 + <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}">{{ .Name }}</a> 13 + {{- end -}} 8 - <div class="font-medium dark:text-white flex gap-2 items-center"> 9 - {{- if $fullName -}} 10 - <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}" 11 - >{{ index $root.DidHandleMap .Did }}/{{ .Name }}</a 12 - > 13 - {{- else -}} 14 - <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}" 15 - >{{ .Name }}</a 16 - > 17 - {{- end -}} 18 - </div> 19 - {{ if .Source }} 20 - <div class="flex items-center my-0.5 text-sm"> 21 - {{ i "git-fork" "w-3 h-3 mr-1" }} 22 - fork 23 - </div> 24 - {{ end }} 25 - {{ with .Description }} 26 - <div class="text-gray-600 dark:text-gray-300 text-sm"> 27 - {{ . }} 28 14 </div> 15 + {{ with .Description }} 16 + <div class="text-gray-600 dark:text-gray-300 text-sm"> 17 + {{ . }} 18 + </div> 19 + {{ end }} 29 - {{ end }} 30 20 21 + {{ if .RepoStats }} 22 + {{ block "repoStats" .RepoStats }} {{ end }} 23 + {{ end }} 31 - {{ if .RepoStats }} 32 - {{ block "repoStats" .RepoStats }}{{ end }} 33 - {{ end }} 34 24 </div> 35 25 {{ end }} 36 26 {{ end }} ··· 39 29 <div class="text-gray-400 pt-4 text-sm font-mono inline-flex gap-4 mt-auto"> 40 30 {{ with .Language }} 41 31 <div class="flex gap-2 items-center text-sm"> 32 + <div class="size-2 rounded-full" 33 + style="background: radial-gradient(circle at 35% 35%, color-mix(in srgb, {{ langColor . }} 70%, white), {{ langColor . }} 30%, color-mix(in srgb, {{ langColor . }} 85%, black));"></div> 42 - <div 43 - class="size-2 rounded-full" 44 - style="background: radial-gradient(circle at 35% 35%, color-mix(in srgb, {{ langColor . }} 70%, white), {{ langColor . }} 30%, color-mix(in srgb, {{ langColor . }} 85%, black));" 45 - ></div> 46 34 <span>{{ . }}</span> 47 35 </div> 48 36 {{ end }} 49 37 {{ with .StarCount }} 38 + <div class="flex gap-1 items-center text-sm"> 39 + {{ i "star" "w-3 h-3 fill-current" }} 40 + <span>{{ . }}</span> 41 + </div> 50 - <div class="flex gap-1 items-center text-sm"> 51 - {{ i "star" "w-3 h-3 fill-current" }} 52 - <span>{{ . }}</span> 53 - </div> 54 42 {{ end }} 55 43 {{ with .IssueCount.Open }} 44 + <div class="flex gap-1 items-center text-sm"> 45 + {{ i "circle-dot" "w-3 h-3" }} 46 + <span>{{ . }}</span> 47 + </div> 56 - <div class="flex gap-1 items-center text-sm"> 57 - {{ i "circle-dot" "w-3 h-3" }} 58 - <span>{{ . }}</span> 59 - </div> 60 48 {{ end }} 61 49 {{ with .PullCount.Open }} 50 + <div class="flex gap-1 items-center text-sm"> 51 + {{ i "git-pull-request" "w-3 h-3" }} 52 + <span>{{ . }}</span> 53 + </div> 62 - <div class="flex gap-1 items-center text-sm"> 63 - {{ i "git-pull-request" "w-3 h-3" }} 64 - <span>{{ . }}</span> 65 - </div> 66 54 {{ end }} 67 55 </div> 68 56 {{ end }} 57 + 58 +
NEW
appview/pages/templates/layouts/repobase.html
··· 5 5 {{ if .RepoInfo.Source }} 6 6 <p class="text-sm"> 7 7 <div class="flex items-center"> 8 - {{ i "git-fork" "w-3 h-3 mr-1"}} 8 + {{ i "git-fork" "w-3 h-3 mr-1 shrink-0" }} 9 9 forked from 10 10 {{ $sourceOwner := didOrHandle .RepoInfo.Source.Did .RepoInfo.SourceHandle }} 11 11 <a class="ml-1 underline" href="/{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}">{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}</a>