@@ -14,8 +14,6 @@ import { Runner } from './models/Runner';
|
||||
import { RunnerCard } from './models/RunnerCard';
|
||||
import { RunnerGroup } from './models/RunnerGroup';
|
||||
|
||||
const sponsors: string[] = ["https://odit.services/assets/img/profile-pic-no_bg.hash.0c81702a.png", "./sponsoringheader.png"]
|
||||
|
||||
/**
|
||||
* This class is responsible for all things pdf creation.
|
||||
* This uses the html templates from src/templates.
|
||||
@@ -91,11 +89,11 @@ export class PdfCreator {
|
||||
);
|
||||
await Handlebars.registerHelper('--sponsor',
|
||||
function (str) {
|
||||
const index = (parseInt(str) % sponsors.length);
|
||||
const index = (parseInt(str) % config.sponor_logos.length);
|
||||
if (isNaN(index)) {
|
||||
return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+P+/HgAFhAJ/wlseKgAAAABJRU5ErkJggg=="
|
||||
}
|
||||
return sponsors[index];
|
||||
return config.sponor_logos[index];
|
||||
}
|
||||
);
|
||||
this.browser = await puppeteer.launch({ headless: true, args: minimal_args });
|
||||
|
||||
Reference in New Issue
Block a user