parent
2a4cfdb2f8
commit
63c7beb8b9
@ -191,7 +191,7 @@ export class PdfCreator {
|
|||||||
await i18next.changeLanguage(locale);
|
await i18next.changeLanguage(locale);
|
||||||
const template_source = fs.readFileSync(`${this.templateDir}/runner_certificate.html`, 'utf8');
|
const template_source = fs.readFileSync(`${this.templateDir}/runner_certificate.html`, 'utf8');
|
||||||
const template = Handlebars.compile(template_source);
|
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);
|
result = await awaitAsyncHandlebarHelpers(result);
|
||||||
const pdf = await this.renderPdf(result, { format: "A4", landscape: false, printBackground: true });
|
const pdf = await this.renderPdf(result, { format: "A4", landscape: false, printBackground: true });
|
||||||
return pdf;
|
return pdf;
|
||||||
|
@ -13,6 +13,7 @@ export const config = {
|
|||||||
sponor_logos: getSponsorLogos(),
|
sponor_logos: getSponsorLogos(),
|
||||||
api_key: getApiKey(),
|
api_key: getApiKey(),
|
||||||
disclaimer_text: process.env.DISCLAIMER_TEXT || "",
|
disclaimer_text: process.env.DISCLAIMER_TEXT || "",
|
||||||
|
donations_footer_text: process.env.DONATIONS_FOOTER_TEXT || "",
|
||||||
contracts_per_runner: parseInt(process.env.CONTRACTS_PER_RUNNER) || 1,
|
contracts_per_runner: parseInt(process.env.CONTRACTS_PER_RUNNER) || 1,
|
||||||
}
|
}
|
||||||
let errors = 0
|
let errors = 0
|
||||||
|
@ -92,9 +92,7 @@
|
|||||||
</main>
|
</main>
|
||||||
<footer class="certificate-footer">
|
<footer class="certificate-footer">
|
||||||
<p>
|
<p>
|
||||||
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
|
{{../donations_footer_text}}
|
||||||
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.
|
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user