diff --git a/templates/certificate/en.html b/templates/certificate/en.html new file mode 100644 index 0000000..d4b16ad --- /dev/null +++ b/templates/certificate/en.html @@ -0,0 +1,102 @@ + + + + + Sponsoring contract + + + + + + {{ range .Runners }} +
+
+

Certificate

+
+
+

{{ .FirstName }} + {{ .MiddleName }} {{ .LastName }} +

+

Ran

+

{{formatUnit "kilometer" .Distance}}km

+

for our good cause at the {{ $.EventName }}

+
+ +
+
+
+

Donations

+
+
+ + + + + + + + {{ range .DistanceDonations}} + + + + + + {{ end }} + + + + + + +
DonorAmount / kmTotal
{{ .Donor.FirstName }} {{ .Donor.MiddleName }} {{ .Donor.LastName }}{{ formatUnit "euro" .AmountPerDistance }} {{ $.CurrencySymbol }}{{ formatUnit "euro" .Amount }} {{ $.CurrencySymbol }}
Combined{{ formatUnit "euro" .TotalPerDistance }} {{ $.CurrencySymbol }}{{ formatUnit "euro" .TotalDonations }} {{ $.CurrencySymbol }}
+
+ +
+ {{ end }} + + + \ No newline at end of file diff --git a/templates/templates.go b/templates/templates.go index 691e04d..e6dd3d2 100644 --- a/templates/templates.go +++ b/templates/templates.go @@ -22,6 +22,9 @@ var ContractTemplateDe string //go:embed certificate/de.html var CertificateTemplateDe string +//go:embed certificate/en.html +var CertificateTemplateEn string + //go:embed images/sponsoringheader.base64 var ImageSponsoringHeaderBase64 string @@ -47,7 +50,7 @@ func GetTemplate(locale, templateName string) (string, error) { case "certificate": switch locale { case "en": - return ContractTemplateEn, nil + return CertificateTemplateEn, nil case "de": return CertificateTemplateDe, nil }