package templates // Breadcrumb is one segment of the current directory path shown above the // file listing, e.g. "docs" linking to "/web/files/docs/". type Breadcrumb struct { Name string Path string // relative path (no leading slash) used to build the link } // FileEntry is a single row (directory or file) in the file browser. type FileEntry struct { Name string IsDir bool Size string // human-readable, empty for directories ModTime string RelPath string // relative path (no leading slash) used to build the link } templ FilesPage(username string, breadcrumbs []Breadcrumb, entries []FileEntry, currentPath string) { @Layout("Files", username) {
| Name | Size | Modified |
|---|---|---|
| if e.IsDir { { e.Name } } else { { e.Name } } | { e.Size } | { e.ModTime } |
| This folder is empty — drag & drop files or folders here, or use the upload buttons above. | ||