{{- define "icon"}} {{- if .IsDir}} {{- if .IsSymlink}}folder-symlink {{- else}}folder {{- end}} {{- else if or (eq .Name "LICENSE") (eq .Name "README")}}license {{- else if .HasExt ".jpg" ".jpeg" ".png" ".apng" ".gif" ".webp" ".avif" ".tiff" ".tif" ".bmp" ".ico" ".heif" ".heic" ".svg"}}image {{- else if .HasExt ".mp4" ".m4v" ".mov" ".mpeg" ".mpg" ".avi" ".ogv" ".ogm" ".webm" ".mkv" ".vob" ".gifv" ".3gp"}}video {{- else if .HasExt ".mp3" ".m4a" ".aac" ".oga" ".ogg" ".opus" ".flac" ".ape" ".wav" ".weba" ".wma" ".midi" ".mid" ".cda"}}audio {{- else if .HasExt ".pdf"}}pdf {{- else if .HasExt ".csv" ".tsv"}}csv {{- else if .HasExt ".txt" ".doc" ".docx" ".odt" ".fodt" ".rtf"}}doc {{- else if .HasExt ".xls" ".xlsx" ".ods" ".fods"}}sheet {{- else if .HasExt ".ppt" ".pptx" ".odp" ".fodp"}}ppt {{- else if .HasExt ".zip" ".gz" ".bz2" ".xz" ".tar" ".tgz" ".7z" ".rar" ".zst" ".lz4"}}archive {{- else if .HasExt ".deb" ".dpkg"}}deb {{- else if .HasExt ".rpm" ".exe" ".flatpak" ".appimage" ".jar" ".msi" ".apk"}}dist {{- else if .HasExt ".ps1"}}ps1 {{- else if .HasExt ".py" ".pyw" ".pyc" ".pyo"}}py {{- else if .HasExt ".bash" ".sh" ".zsh" ".fish" ".com" ".bat" ".cmd" ".dll" ".so" ".dylib"}}sh {{- else if .HasExt ".dmg"}}dmg {{- else if .HasExt ".iso" ".img"}}iso {{- else if .HasExt ".md" ".mdown" ".markdown"}}md {{- else if .HasExt ".ttf" ".otf" ".woff" ".woff2" ".eot"}}font {{- else if .HasExt ".go" ".mod" ".sum"}}go {{- else if .HasExt ".html" ".htm" ".xhtml"}}html {{- else if .HasExt ".js" ".mjs" ".cjs" ".jsx"}}js {{- else if .HasExt ".css" ".scss" ".sass" ".less"}}css {{- else if .HasExt ".json" ".json5" ".jsonc" ".ndjson"}}json {{- else if .HasExt ".ts" ".tsx" ".mts"}}ts {{- else if .HasExt ".sql"}}sql {{- else if .HasExt ".db" ".sqlite" ".sqlite3" ".bak" ".mdb"}}db {{- else if .HasExt ".eml" ".email" ".mailbox" ".mbox" ".msg"}}email {{- else if .HasExt ".crt" ".pem" ".x509" ".cer" ".ca-bundle"}}cert {{- else if .HasExt ".key" ".keystore" ".jks" ".p12" ".pfx" ".pub"}}keystore {{- else}} {{- if .IsSymlink}}symlink {{- else}}generic {{- end}} {{- end}} {{- end}} {{- $nonce := uuidv4}} {{- $n := print "nonce=" (quote $nonce)}} {{/* To disable the Content-Security-Policy, set this to false */}}{{- $enableCsp := true}} {{- if $enableCsp}} {{- $csp := "default-src 'none'; img-src 'self' data:; media-src 'self' blob:; frame-src 'self'; connect-src 'self'; font-src 'self'; style-src 'nonce-%s'; script-src 'nonce-%s'; object-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'"}} {{- .RespHeader.Set "Content-Security-Policy" (printf $csp $nonce $nonce)}} {{- end}} {{html .Name}}
{{.NumDirs}} {{if eq .NumDirs 1}}folder{{else}}folders{{end}} {{.NumFiles}} {{if eq .NumFiles 1}}file{{else}}files{{end}} {{.HumanTotalFileSize}}
{{- $ord := "asc"}}{{if eq .Order "asc"}}{{$ord = "desc"}}{{end}} {{- $lay := ""}}{{if ne .Layout "list"}}{{$lay = "&layout=grid"}}{{end}} {{- if ne .Layout "list"}} Name Size Date {{- end}} {{- /* Caddy's namedirfirst reverses the WHOLE list under order=desc, i.e. folders LAST, so grouping only exists in asc: enabling it must force asc, and the chip may only read as "on" for namedirfirst+asc. Carrying .Order here put folders last. */}} {{- $grp := and (eq .Sort "namedirfirst") (eq .Order "asc")}} Folders first
{{- if not .Items}}
This folder is empty.
{{- else if ne .Layout "list"}} {{- else}} Name Size Modified {{- if .CanGoUp}} {{- end}} {{- range .Items}} {{- end}}
.. —
{{- if .IsDir}}
{{- else}} {{- end}} {{html .Name}}{{if .SymlinkPath}}→ {{html .SymlinkPath}}{{end}}
{{if .IsDir}}—{{else}}{{.HumanSize}}{{end}}
{{- end}}
{{- if .Limit}} {{- end}}

Keyboard

/
focus the filter box
Esc
clear filter / close preview
← →
previous / next item (seek ±5s in video)
PgUp PgDn
previous / next item
Home End
first / last item
Space
play / pause video
f
expand — hide interface
g / l
grid / list layout
?
this dialog