feat: migrate anime module to modular domain pattern

This commit is contained in:
2026-05-13 10:32:44 +02:00
parent 34aeb91252
commit c32ffd54de
7 changed files with 516 additions and 0 deletions

View File

@@ -191,6 +191,13 @@ func (h HTMLRender) Render(w http.ResponseWriter) error {
if !ok {
return fmt.Errorf("template %s not found", h.Name)
}
if block, ok := h.Data.(map[string]any)["_fragment"]; ok {
if blockStr, ok := block.(string); ok {
return tmpl.ExecuteTemplate(w, blockStr, h.Data)
}
}
return tmpl.ExecuteTemplate(w, "base.gohtml", h.Data)
}