add script_tags helper

This commit is contained in:
2024-03-15 14:18:36 -05:00
parent d24b2a121e
commit dc17ca76ba
2 changed files with 11 additions and 0 deletions

View File

@@ -43,6 +43,16 @@ hbs.registerHelper('section', (name, options) => {
this._sections[name] = options.fn(this);
return null;
})
hbs.registerHelper('script_tags', (scripts, options) => {
if(!scripts) {
return null;
}
var result = [];
scripts.forEach((script)=>{
result.push(`<script src="${script}"></script>`)
})
return result.join('\n');
})
hbs.registerHelper("embeddedSvgFromPath", require('./lib/utils').embeddedSvgFromPath)
hbs.registerHelper(require("./controllers/event").helpers)
hbs.registerHelper(require("./controllers/eventlineup").helpers)

View File

@@ -31,4 +31,5 @@
</div>
</div>
</body>
{{{script_tags scripts}}}
</html>