X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Ftemplate-helper.js;h=c61958db9a31a67ae34b84dea72edfa6a4e125f0;hb=b866a78273f6307d2144a91ef4c1c4a28a00486a;hp=122a3a09783b8aad2306d238bb134dc02bfb6c47;hpb=1d150b8050db306991685cfbd294ef8f3b714fca;p=squeep-html-template-helper diff --git a/lib/template-helper.js b/lib/template-helper.js index 122a3a0..c61958d 100644 --- a/lib/template-helper.js +++ b/lib/template-helper.js @@ -70,6 +70,7 @@ function htmlHead(pagePathLevel, ctx, options) { } = options; return `\t \t\t +\t\t \t\t \t\t ${headElements.map((e) => '\t\t' + e).join('\n')} @@ -91,8 +92,9 @@ function htmlBody(pagePathLevel, ctx, options, main = []) { const { bodyAttributes = {}, } = options; + const firefoxFix = '\n'; // This fixes a layout rendering flash on load in Firefox; do not know why this works, but it does. return ` -\t +\t${firefoxFix} ${htmlHeader(pagePathLevel, ctx, options)} ${htmlMessages(ctx, options)} \t\t
@@ -145,7 +147,7 @@ ${spacer}` : ''; * @returns {String} */ function htmlHeader(pagePathLevel, ctx, options) { - const rootPathPfx = '../'.repeat(Math.max(pagePathLevel - 1, 0)); + const rootPathPfx = '../'.repeat(pagePathLevel); const { logoUrl = '', pageTitle = '',