package pages import ( "fmt" "git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/components/gallery" "git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/pkg/templer" "git.schreifuchs.ch/schreifuchs/schreifuchs.ch/web/components" ) const detailsID = "imgs-details" // detailsContentID is the inner element of the modal that htmx swaps into. // It is defined by components.Modal and must not be the dialog itself. const detailsContentID = detailsID + "-content" templ GallerySet(g gallery.Set) {
@components.Modal(detailsID) { // Placeholder: only visible until the first image is swapped in. // prev/next are nil because relative links would be resolved // against the gallery index, not the image page. if len(g.SM.Images) > 0 { @GalleryImage(g.SM.Images[0].UID, nil, nil) } }
for _,img := range g.SM.Images { }
} templ GalleryImage(image string, next *gallery.Image, prev *gallery.Image) {
Image description if prev != nil { } if next != nil { }
} templ Gallery(g gallery.Gallery) {
for _, img := range g.Images {
}
}