feat(templates): Get static mounted images

This commit is contained in:
2024-12-03 19:56:57 +01:00
parent d910a722df
commit 4deda8adf1
4 changed files with 13 additions and 5 deletions

View File

@@ -81,7 +81,11 @@ func (t *DefaultTemplater) GenerateBarcode(code string, format string, prefix st
}
func (t *DefaultTemplater) SelectSponsorImage(id int) (string, error) {
return templates.GetImage("error"), nil
sponsors := []string{
"sponsoringheader",
"odit",
}
return templates.GetImage(sponsors[id%len(sponsors)]), nil
}
func (t *DefaultTemplater) StringToTemplate(templateString string) (*template.Template, error) {