parent
2a4cfdb2f8
commit
63c7beb8b9
|
@ -191,7 +191,7 @@ export class PdfCreator {
|
|||
await i18next.changeLanguage(locale);
|
||||
const template_source = fs.readFileSync(`${this.templateDir}/runner_certificate.html`, 'utf8');
|
||||
const template = Handlebars.compile(template_source);
|
||||
let result = template({ runners, eventname: config.eventname, currency_symbol: config.currency_symbol });
|
||||
let result = template({ runners, eventname: config.eventname, currency_symbol: config.currency_symbol, donations_footer_text: config.donations_footer_text });
|
||||
result = await awaitAsyncHandlebarHelpers(result);
|
||||
const pdf = await this.renderPdf(result, { format: "A4", landscape: false, printBackground: true });
|
||||
return pdf;
|
||||
|
|
|
@ -13,6 +13,7 @@ export const config = {
|
|||
sponor_logos: getSponsorLogos(),
|
||||
api_key: getApiKey(),
|
||||
disclaimer_text: process.env.DISCLAIMER_TEXT || "",
|
||||
donations_footer_text: process.env.DONATIONS_FOOTER_TEXT || "",
|
||||
contracts_per_runner: parseInt(process.env.CONTRACTS_PER_RUNNER) || 1,
|
||||
}
|
||||
let errors = 0
|
||||
|
|
|
@ -92,9 +92,7 @@
|
|||
</main>
|
||||
<footer class="certificate-footer">
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
|
||||
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
|
||||
clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
||||
{{../donations_footer_text}}
|
||||
</p>
|
||||
</footer>
|
||||
</article>
|
||||
|
|
Loading…
Reference in New Issue