Monorepo for Tangled tangled.org

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 <mozzius@protonmail.com>

authored by samuel.fm and committed by Tangled a9e1c2aa a00609c1

Changed files
+40 -30
appview
pages
templates
user
fragments
+40 -30
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 + {{ . }} 14 28 </div> 15 - {{ with .Description }} 16 - <div class="text-gray-600 dark:text-gray-300 text-sm"> 17 - {{ . }} 18 - </div> 19 - {{ end }} 29 + {{ end }} 20 30 21 - {{ if .RepoStats }} 22 - {{ block "repoStats" .RepoStats }} {{ end }} 23 - {{ end }} 31 + {{ if .RepoStats }} 32 + {{ block "repoStats" .RepoStats }}{{ end }} 33 + {{ end }} 24 34 </div> 25 35 {{ end }} 26 36 {{ end }} ··· 29 39 <div class="text-gray-400 pt-4 text-sm font-mono inline-flex gap-4 mt-auto"> 30 40 {{ with .Language }} 31 41 <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> 34 46 <span>{{ . }}</span> 35 47 </div> 36 48 {{ end }} 37 49 {{ 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> 42 54 {{ end }} 43 55 {{ 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> 48 60 {{ end }} 49 61 {{ 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> 54 66 {{ end }} 55 67 </div> 56 68 {{ end }} 57 - 58 -