diff --git a/src/app.js b/src/app.js index 2656dc0..e289029 100644 --- a/src/app.js +++ b/src/app.js @@ -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(``) + }) + return result.join('\n'); +}) hbs.registerHelper("embeddedSvgFromPath", require('./lib/utils').embeddedSvgFromPath) hbs.registerHelper(require("./controllers/event").helpers) hbs.registerHelper(require("./controllers/eventlineup").helpers) diff --git a/src/views/layouts/main.hbs b/src/views/layouts/main.hbs index e433e38..2ae6934 100644 --- a/src/views/layouts/main.hbs +++ b/src/views/layouts/main.hbs @@ -31,4 +31,5 @@ +{{{script_tags scripts}}}