refactor(templates): Dynamic template loading

This commit is contained in:
2024-12-09 17:22:37 +01:00
parent f9f30e96c7
commit c5dc4f7e79
17 changed files with 35 additions and 77 deletions

View File

@@ -9,7 +9,6 @@ import (
"image/png"
"strings"
"git.odit.services/lfk/document-server/templates"
"github.com/boombuler/barcode"
"github.com/boombuler/barcode/code128"
"github.com/boombuler/barcode/ean"
@@ -88,7 +87,7 @@ func (t *DefaultTemplater) SelectSponsorImage(id int) (string, error) {
"odit",
"sparkasse",
}
return templates.GetImage(sponsors[id%len(sponsors)]), nil
return GetImage(sponsors[id%len(sponsors)]), nil
}
func FormatUnit(unit string, locale string, amount int) (string, error) {

28
services/templates.go Normal file

File diff suppressed because one or more lines are too long