package web import "github.com/invopop/ctxi18n/i18n" import "net/http" import "dwelling-files/pkg/files" import "dwelling-files/pkg/utils" import "strconv" templ Index(currentPath, progVer string, stat *files.DirStat, entries *[]files.DirEntry, r *http.Request) { Arav's dwelling / { i18n.T(ctx, "title") }
Arav's dwelling Welcome to my sacred place, wanderer
@templ.Raw(currentPath)

{ i18n.T(ctx, "stats.files") }: { strconv.FormatInt(stat.Files, 10) } ({ stat.FilesSize }); { i18n.T(ctx, "stats.directories") }: { strconv.FormatInt(stat.Directories, 10) }.

for i, entry := range *entries { }
{ i18n.T(ctx, "table.name") } { i18n.T(ctx, "table.date") } { i18n.T(ctx, "table.size") }
../
{ entry.Name } { utils.ToClientTimezone(entry.Datetime, r).Format(files.FileDateFormat) } { entry.Size }
@templ.Raw(currentPath)
}