{{- define "icon"}} {{- if .IsDir}} {{- else if .HasExt ".jpg" ".jpeg" ".png" ".gif" ".webp"}} {{- else if .HasExt ".mp4" ".mov" ".mpeg" ".avi" ".ogg" ".webm"}} {{- else if .HasExt ".mp3" ".flac" ".wav" ".wma"}} {{- else if .HasExt ".pdf"}} {{- else if .HasExt ".txt"}} {{- else if .HasExt ".zip" ".gz" ".xz" ".tar"}} {{- else if .HasExt ".md" ".mdown" ".markdown"}} {{- else if .HasExt ".go"}} {{- else}} {{- if .IsSymlink}} {{- else}} {{- end}} {{- end}} {{- end}} {{html .Name}} {{- if eq .Layout "grid"}} {{- end}}

{{range $i, $crumb := .Breadcrumbs}}{{html $crumb.Text}}{{if ne $i 0}}/{{end}}{{end}}

{{.NumDirs}} director{{if eq 1 .NumDirs}}y{{else}}ies{{end}} {{.NumFiles}} file{{if ne 1 .NumFiles}}s{{end}} {{- if ne 0 .Limit}} (of which only {{.Limit}} are displayed) {{- end}}
List Grid
{{- if eq .Layout "grid"}} {{- range .Items}}
{{template "icon" .}}
{{html .Name}}
{{.HumanSize}}
{{- end}} {{- else}} {{- if .CanGoUp}} {{- end}} {{- range .Items}} {{- if .IsDir}} {{- else}} {{- end}} {{- end}}
{{- if and (eq .Sort "namedirfirst") (ne .Order "desc")}} {{- else if and (eq .Sort "namedirfirst") (ne .Order "asc")}} {{- else}} {{- end}} {{- if and (eq .Sort "name") (ne .Order "desc")}} Name {{- else if and (eq .Sort "name") (ne .Order "asc")}} Name {{- else}} Name {{- end}}
{{- if and (eq .Sort "size") (ne .Order "desc")}} Size {{- else if and (eq .Sort "size") (ne .Order "asc")}} Size {{- else}} Size {{- end}} {{- if and (eq .Sort "time") (ne .Order "desc")}} Modified {{- else if and (eq .Sort "time") (ne .Order "asc")}} Modified {{- else}} Modified {{- end}}
Up
{{template "icon" .}} {{html .Name}}
{{.HumanSize}}
{{- end}}