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