From 3345571bd88966e4a210e19c334d53927aa73574 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Tue, 3 Dec 2024 18:23:20 +0100 Subject: [PATCH] refactor(templates): Switched to golang templates --- templates/card/de.html | 18 +++++++++--------- templates/card/en.html | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/templates/card/de.html b/templates/card/de.html index 051316b..4a949d2 100644 --- a/templates/card/de.html +++ b/templates/card/de.html @@ -30,25 +30,25 @@
- {{#each cards}} + {{ range .cards }}
-

{{../eventname}}

-

{{../card_subtitle}}

+

{{ $.EventName }}

+

{{ $.CardSubtitle }}

Mit Unterstützung von:

+ src="data:image/png;base64,{{ sponsorLogo .ID }}" />
+ src="data:image/png;base64,{{ barcode .Code $.BarcodeFormat $.BarcodePrefix }}" />
-

{{this.runner.lastname}}, {{this.runner.firstname}} {{this.runner.middlename}}

-

{{this.runner.group.fullName}}

+

{{ .Runner.LastName }}, {{ .Runner.FirstName }} {{ .Runner.MiddleName }}

+

{{ .Runner.Group.Name }}

{{/each}}
@@ -59,9 +59,9 @@
- +
- +
{{/each}}
diff --git a/templates/card/en.html b/templates/card/en.html index 25987ff..45e86b2 100644 --- a/templates/card/en.html +++ b/templates/card/en.html @@ -32,23 +32,23 @@
{{#each cards}}
-

{{../eventname}}

-

{{../card_subtitle}}

+

{{ $.EventName }}

+

{{ $.CardSubtitle }}

Supported by:

+ src="data:image/png;base64,{{ sponsorLogo .ID }}" />
+ src="data:image/png;base64,{{ barcode .Code $.BarcodeFormat $.BarcodePrefix }}" />
-

{{this.runner.lastname}}, {{this.runner.firstname}} {{this.runner.middlename}}

-

{{this.runner.group.fullName}}

+

{{ .Runner.LastName }}, {{ .Runner.FirstName }} {{ .Runner.MiddleName }}

+

{{ .Runner.Group.Name }}

{{/each}}
@@ -59,9 +59,9 @@
- +
- +
{{/each}}