forked from tangled.org/core
this repo has no description

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

authored by samuel.fm and committed by Tangled 36949a45 a9e1c2aa

Changed files
+11 -14
appview
pages
templates
layouts
user
fragments
+1 -1
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>
+10 -13
appview/pages/templates/user/fragments/repoCard.html
··· 4 4 {{ $fullName := index . 2 }} 5 5 6 6 {{ with $repo }} 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"> 7 + <div class="py-4 px-6 gap-2 flex flex-col drop-shadow-sm rounded bg-white dark:bg-gray-800"> 8 + <div class="font-medium dark:text-white flex items-center"> 9 + {{ if .Source }} 10 + {{ i "git-fork" "w-4 h-4 mr-1.5 shrink-0" }} 11 + {{ else }} 12 + {{ i "book-marked" "w-4 h-4 mr-1.5 shrink-0" }} 13 + {{ end }} 9 14 {{- if $fullName -}} 10 15 <a href="/{{ index $root.DidHandleMap .Did }}/{{ .Name }}" 11 16 >{{ index $root.DidHandleMap .Did }}/{{ .Name }}</a ··· 16 21 > 17 22 {{- end -}} 18 23 </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 24 {{ with .Description }} 26 25 <div class="text-gray-600 dark:text-gray-300 text-sm"> 27 26 {{ . }} ··· 36 35 {{ end }} 37 36 38 37 {{ define "repoStats" }} 39 - <div class="text-gray-400 pt-4 text-sm font-mono inline-flex gap-4 mt-auto"> 38 + <div class="text-gray-400 text-sm font-mono inline-flex gap-4 mt-auto"> 40 39 {{ with .Language }} 41 40 <div class="flex gap-2 items-center text-sm"> 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> 41 + <div class="size-2 rounded-full" 42 + 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> 46 43 <span>{{ . }}</span> 47 44 </div> 48 45 {{ end }}