fix(gallery): use component template
release.yaml / publish (push) Successful in 3m51s

This commit is contained in:
schreifuchs committed 2026-09-29 10:46:45 +02:00
1 parent 297efaa4a6
commit 812891a205
7 files changed
+36 -15

No files matched your search

+2 -2
View File
@@ -27,7 +27,7 @@ func (h *Handler) gallery(w http.ResponseWriter, r *http.Request) {
ctx = templer.AppendHeader(ctx, fmt.Sprintf(`<link rel="preload" href="%s?w=800" as="image" />`, image.URL()))
}
h.r.Render(ctx, w, r, pages.GallerySet(imgs))
h.r.RenderPage(ctx, w, r, pages.GallerySet(imgs))
}
func (h *Handler) image(w http.ResponseWriter, r *http.Request) {
@@ -41,5 +41,5 @@ func (h *Handler) image(w http.ResponseWriter, r *http.Request) {
return
}
h.r.Render(r.Context(), w, r, pages.GalleryImage(uid, next, prev))
h.r.RenderComponent(r.Context(), w, r, pages.GalleryImage(uid, next, prev))
}
+2 -1
View File
@@ -40,5 +40,6 @@ type galleryService interface {
GetPrevAndNext(ctx context.Context, uid string) (previous *gallery.Image, next *gallery.Image, err error)
}
type renderer interface {
Render(ctx context.Context, w io.Writer, r *http.Request, component templ.Component)
RenderPage(ctx context.Context, w io.Writer, r *http.Request, component templ.Component)
RenderComponent(ctx context.Context, w io.Writer, r *http.Request, component templ.Component)
}