forked from tangled.org/core
this repo has no description
at drop-at 2.9 kB view raw
1{{ define "title"}}{{ range .BreadCrumbs }}{{ index . 0}}/{{ end }} at {{ .Ref }} &middot; {{ .RepoInfo.FullName }}{{ end }} 2 3 4{{ define "extrameta" }} 5 <meta name="vcs:clone" content="https://tangled.sh/{{ .RepoInfo.FullName }}"/> 6 <meta name="forge:summary" content="https://tangled.sh/{{ .RepoInfo.FullName }}"> 7 <meta name="forge:dir" content="https://tangled.sh/{{ .RepoInfo.FullName }}/tree/{ref}/{path}"> 8 <meta name="forge:file" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}"> 9 <meta name="forge:line" content="https://tangled.sh/{{ .RepoInfo.FullName }}/blob/{ref}/{path}#L{line}"> 10 <meta name="go-import" content="tangled.sh/{{ .RepoInfo.FullNameWithoutAt }} git https://tangled.sh/{{ .RepoInfo.FullName }}"> 11{{ end }} 12 13 14{{define "repoContent"}} 15<main> 16 <div class="tree"> 17 {{ $containerstyle := "py-1" }} 18 {{ $linkstyle := "no-underline hover:underline" }} 19 20 <div class="pb-2 text-base"> 21 <div class="flex justify-between"> 22 <div id="breadcrumbs"> 23 {{ range .BreadCrumbs }} 24 <a href="{{ index . 1}}" class="text-bold text-gray-500 {{ $linkstyle }}">{{ index . 0 }}</a> / 25 {{ end }} 26 </div> 27 <div id="dir-info"> 28 <span class="text-gray-500 text-xs"> 29 {{ $stats := .TreeStats }} 30 31 {{ if eq $stats.NumFolders 1 }} 32 {{ $stats.NumFolders }} folder 33 <span class="px-1 select-none">·</span> 34 {{ else if gt $stats.NumFolders 1 }} 35 {{ $stats.NumFolders }} folders 36 <span class="px-1 select-none">·</span> 37 {{ end }} 38 39 {{ if eq $stats.NumFiles 1 }} 40 {{ $stats.NumFiles }} file 41 {{ else if gt $stats.NumFiles 1 }} 42 {{ $stats.NumFiles }} files 43 {{ end }} 44 </span> 45 </div> 46 </div> 47 </div> 48 49 {{ range .Files }} 50 {{ if not .IsFile }} 51 <div class="{{ $containerstyle }}"> 52 <div class="flex justify-between items-center"> 53 <a href="/{{ $.BaseTreeLink }}/{{ .Name }}" class="{{ $linkstyle }}"> 54 <div class="flex items-center gap-2"> 55 {{ i "folder" "w-3 h-3 fill-current" }}{{ .Name }} 56 </div> 57 </a> 58 <time class="text-xs text-gray-500">{{ timeFmt .LastCommit.When }}</time> 59 </div> 60 </div> 61 {{ end }} 62 {{ end }} 63 64 {{ range .Files }} 65 {{ if .IsFile }} 66 <div class="{{ $containerstyle }}"> 67 <div class="flex justify-between items-center"> 68 <a href="/{{ $.BaseBlobLink }}/{{ .Name }}" class="{{ $linkstyle }}"> 69 <div class="flex items-center gap-2"> 70 {{ i "file" "w-3 h-3" }}{{ .Name }} 71 </div> 72 </a> 73 <time class="text-xs text-gray-500">{{ timeFmt .LastCommit.When }}</time> 74 </div> 75 </div> 76 {{ end }} 77 {{ end }} 78 </div> 79</main> 80{{end}}