feat(cards): Generate placeholders for cards without a pair

This commit is contained in:
2024-12-03 19:20:28 +01:00
parent b179541532
commit f880e9f10c
4 changed files with 51 additions and 11 deletions

View File

@@ -28,10 +28,12 @@
</head>
<body class="A4 landscape">
{{ range .CardSegments }}
<div class="sheet">
<div class="columns is-multiline">
{{ range .Cards }}
<div class="column is-half runnercard">
{{ if ne .Code "" }}
<p class="title is-5" style="text-align: center; padding-bottom: 0; margin-top: -0.75rem;">{{ $.EventName }}</p>
<p style="text-align: center; margin-top: -1.5rem; font-size: small;">{{ $.CardSubtitle }}</p>
<p style="font-size: small;">Mit Unterstützung von:</p>
@@ -50,6 +52,7 @@
</div>
<p>{{ .Runner.LastName }}, {{ .Runner.FirstName }} {{ .Runner.MiddleName }}</p>
<p>{{ .Runner.Group.Name }}</p>
{{ end}}
</div>
{{ end }}
</div>
@@ -58,16 +61,20 @@
<div class="columns is-multiline">
{{ range .CardsSwapped }}
<div class="column is-half runnercard" style="justify-content: center; align-items: center; text-align: center;">
{{ if ne .Code "" }}
<!--SPONSOR LOGO FIRST-->
<div style="height: 2cm; padding: 0 0 1cm 0">
<img style="object-fit: cover; max-height: 2cm;" src="data:image/png;base64,{{ sponsorLogo .ID }}" />
</div>
<img style="object-fit: cover; max-height: 6rem; position: relative;" src="data:image/png;base64,{{ barcode .Code $.BarcodeFormat $.BarcodePrefix }}" />
<img style="object-fit: cover; max-height: 6rem; position: relative;"
src="data:image/png;base64,{{ barcode .Code $.BarcodeFormat $.BarcodePrefix }}" />
<p style="font-size: 1rem; text-align: center; margin: 0; padding: 0;">{{ .Code }}</p>
{{ end }}
</div>
{{ end }}
</div>
</div>
{{ end}}
</body>
</html>

View File

@@ -28,6 +28,7 @@
</head>
<body class="A4 landscape">
{{ range .CardSegments }}
<div class="sheet">
<div class="columns is-multiline">
{{ range .Cards }}
@@ -68,6 +69,7 @@
{{ end }}
</div>
</div>
{{ end}}
</body>
</html>