this repo has no description
1{{ define "title" }} 2 {{ range .BreadCrumbs }}{{ pathUnescape (index . 0) }}/{{ end }} at {{ .Ref }} 3 &middot; {{ .RepoInfo.FullName }} 4{{ end }} 5 6{{ define "extrameta" }} 7 8 {{ $path := "" }} 9 {{ range .BreadCrumbs }} 10 {{ $path = printf "%s/%s" $path (index . 0) }} 11 {{ end }} 12 13 {{ template "repo/fragments/meta" . }} 14 {{ $title := printf "%s at %s &middot; %s" $path .Ref .RepoInfo.FullName }} 15 {{ $url := printf "https://tangled.sh/%s/tree/%s%s" .RepoInfo.FullName .Ref $path }} 16 17 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} 18{{ end }} 19 20{{ define "repoContent" }} 21 <main> 22 <div class="tree"> 23 {{ $linkstyle := "no-underline hover:underline" }} 24 25 26 <div 27 class="pb-2 mb-3 text-base border-b border-gray-200 dark:border-gray-700"> 28 <div class="flex flex-col md:flex-row md:justify-between gap-2"> 29 <div 30 id="breadcrumbs" 31 class="overflow-x-auto whitespace-nowrap text-gray-400 dark:text-gray-500"> 32 {{ range .BreadCrumbs }} 33 <a 34 href="{{ index . 1 }}" 35 class="text-bold text-gray-500 dark:text-gray-400 {{ $linkstyle }}"> 36 {{ pathUnescape (index . 0) }} 37 </a> 38 / 39 {{ end }} 40 </div> 41 <div 42 id="dir-info" 43 class="text-gray-500 dark:text-gray-400 text-xs md:text-sm flex flex-wrap items-center gap-1 md:gap-0"> 44 {{ $stats := .TreeStats }} 45 46 47 <span> 48 at 49 <a href="/{{ $.RepoInfo.FullName }}/tree/{{ $.Ref }}"> 50 {{ $.Ref }} 51 </a> 52 </span> 53 {{ if eq $stats.NumFolders 1 }} 54 <span 55 class="select-none px-1 md:px-2 [&:before]:content-['·']"></span> 56 <span>{{ $stats.NumFolders }} folder</span> 57 {{ else if gt $stats.NumFolders 1 }} 58 <span 59 class="select-none px-1 md:px-2 [&:before]:content-['·']"></span> 60 <span>{{ $stats.NumFolders }} folders</span> 61 {{ end }} 62 63 {{ if eq $stats.NumFiles 1 }} 64 <span 65 class="select-none px-1 md:px-2 [&:before]:content-['·']"></span> 66 <span>{{ $stats.NumFiles }} file</span> 67 {{ else if gt $stats.NumFiles 1 }} 68 <span 69 class="select-none px-1 md:px-2 [&:before]:content-['·']"></span> 70 <span>{{ $stats.NumFiles }} files</span> 71 {{ end }} 72 73 </div> 74 </div> 75 </div> 76 77 {{ range .Files }} 78 <div class="grid grid-cols-12 gap-4 items-center py-1"> 79 <div class="col-span-6 md:col-span-4"> 80 {{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) $.TreePath .Name }} 81 {{ $icon := "folder" }} 82 {{ $iconStyle := "size-4 fill-current" }} 83 84 {{ if .IsFile }} 85 {{ $icon = "file" }} 86 {{ $iconStyle = "size-4" }} 87 {{ end }} 88 <a href="{{ $link }}" class="{{ $linkstyle }}"> 89 <div class="flex items-center gap-2"> 90 {{ i $icon $iconStyle "flex-shrink-0" }} 91 <span class="truncate">{{ .Name }}</span> 92 </div> 93 </a> 94 </div> 95 96 <div class="col-span-0 md:col-span-6 hidden md:block overflow-hidden"> 97 {{ with .LastCommit }} 98 <a 99 href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash }}" 100 class="text-gray-500 dark:text-gray-400 block truncate"> 101 {{ .Message }} 102 </a> 103 {{ end }} 104 </div> 105 106 <div class="col-span-6 md:col-span-2 text-right"> 107 {{ with .LastCommit }} 108 <a 109 href="/{{ $.RepoInfo.FullName }}/commit/{{ .Hash }}" 110 class="text-gray-500 dark:text-gray-400"> 111 {{ template "repo/fragments/time" .When }} 112 </a> 113 {{ end }} 114 </div> 115 </div> 116 {{ end }} 117 118 </div> 119 </main> 120{{ end }}