{{ define "title"}}{{ range .BreadCrumbs }}{{ pathUnescape (index . 0)}}/{{ end }} at {{ .Ref }} · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} {{ $path := "" }} {{ range .BreadCrumbs }} {{ $path = printf "%s/%s" $path (index . 0) }} {{ end }} {{ template "repo/fragments/meta" . }} {{ $title := printf "%s at %s · %s" $path .Ref .RepoInfo.FullName }} {{ $url := printf "https://tangled.org/%s/tree/%s%s" .RepoInfo.FullName .Ref $path }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{define "repoContent"}}
{{ $linkstyle := "no-underline hover:underline" }}
{{ $stats := .TreeStats }} at {{ $.Ref }} {{ if eq $stats.NumFolders 1 }} {{ $stats.NumFolders }} folder {{ else if gt $stats.NumFolders 1 }} {{ $stats.NumFolders }} folders {{ end }} {{ if eq $stats.NumFiles 1 }} {{ $stats.NumFiles }} file {{ else if gt $stats.NumFiles 1 }} {{ $stats.NumFiles }} files {{ end }}
{{ range .Files }}
{{ $link := printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (pathEscape $.Ref) $.TreePath .Name }} {{ $icon := "folder" }} {{ $iconStyle := "size-4 fill-current" }} {{ if .IsSubmodule }} {{ $link = printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) $.TreePath .Name }} {{ $icon = "folder-input" }} {{ $iconStyle = "size-4" }} {{ end }} {{ if .IsFile }} {{ $link = printf "/%s/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) $.TreePath .Name }} {{ $icon = "file" }} {{ $iconStyle = "size-4" }} {{ end }}
{{ i $icon $iconStyle "flex-shrink-0" }} {{ .Name }}
{{ with .LastCommit }} {{ template "repo/fragments/time" .When }} {{ end }}
{{ end }}
{{end}} {{ define "repoAfter" }} {{- if or .HTMLReadme .Readme -}} {{ template "repo/fragments/readme" . }} {{- end -}} {{ end }}