package pages import ( "git.hafen.run/lukas/timeshare/components/badge" "git.hafen.run/lukas/timeshare/components/button" "git.hafen.run/lukas/timeshare/components/checkbox" "git.hafen.run/lukas/timeshare/components/icon" "git.hafen.run/lukas/timeshare/components/table" "path" "time" ) type File struct { Filename string Key string } templ filetypeIcon(filename string) { switch path.Ext(filename) { case ".jpg",".jpeg", ".png",".heic", ".webp", ".avif", ".gif", ".tiff": @icon.FileImage() case ".mp3",".flac", ".m4a",".m4b", ".wav", ".midi": @icon.FileAudio() case ".mov",".mp4": @icon.FileVideo() case ".txt",".md": @icon.FileText() case ".zip": @icon.FileArchive() case ".xlsx", ".csv": @icon.FileSpreadsheet() case ".pdf", ".docx", ".doc": @icon.FileText() case ".epub": @icon.BookMarked() case ".stl", ".3mf", ".step": @icon.FileAxis3d() case ".json": @icon.FileJson() default: @icon.File() } } templ ListShareContents(expires time.Time, shareid string, files []File) { @PageSkeleton("Download - Time Share") {