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