forked from tangled.org/core
Monorepo for Tangled

appview/pages: improve styling for repo source in repo headers

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 926b6451 fe1298fa

verified
Changed files
+11 -8
appview
pages
templates
layouts
+11 -8
appview/pages/templates/layouts/repobase.html
··· 2 2 3 3 {{ define "content" }} 4 4 <section id="repo-header" class="mb-4 p-2 dark:text-white"> 5 - {{ if .RepoInfo.Source }} 6 - <div class="flex items-center"> 7 - {{ i "git-fork" "w-3 h-3 mr-1 shrink-0" }} 8 - forked from 9 - {{ $sourceOwner := didOrHandle .RepoInfo.Source.Did .RepoInfo.SourceHandle }} 10 - <a class="ml-1 underline" href="/{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}">{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}</a> 11 - </div> 12 - {{ end }} 13 5 <div class="text-lg flex flex-col sm:flex-row items-start gap-4 justify-between"> 14 6 <!-- left items --> 15 7 <div class="flex flex-col gap-2"> ··· 19 11 <span class="select-none">/</span> 20 12 <a href="/{{ .RepoInfo.FullName }}" class="font-bold">{{ .RepoInfo.Name }}</a> 21 13 </div> 14 + 15 + {{ if .RepoInfo.Source }} 16 + {{ $sourceOwner := resolve .RepoInfo.Source.Did }} 17 + <div class="flex items-center gap-1 text-sm flex-wrap"> 18 + {{ i "git-fork" "w-3 h-3 shrink-0" }} 19 + <span>forked from</span> 20 + <a class="underline" href="/{{ $sourceOwner }}/{{ .RepoInfo.Source.Name }}"> 21 + {{ $sourceOwner }}/{{ .RepoInfo.Source.Name }} 22 + </a> 23 + </div> 24 + {{ end }} 22 25 23 26 <span class="flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-gray-600 dark:text-gray-300"> 24 27 {{ if .RepoInfo.Description }}