X-Git-Url: http://git.squeep.com/?p=squeep-authentication-module;a=blobdiff_plain;f=lib%2Ftemplate%2Flogin-html.js;h=8ee7392ad9f4883150546a444f1f4c7c23a2c42f;hp=f59e002ca8111c85dd2b308a332280e948536f93;hb=2c3ddf0a6f40b9d0a4e54fa12b84b8af33eaaadc;hpb=54ca04e330d14a12344ddc2b161c1d9b55bfd7d7 diff --git a/lib/template/login-html.js b/lib/template/login-html.js index f59e002..8ee7392 100644 --- a/lib/template/login-html.js +++ b/lib/template/login-html.js @@ -1,6 +1,7 @@ 'use strict'; const { TemplateHelper: th } = require('@squeep/html-template-helper'); +const { sessionNavLinks } = require('./helpers'); /** * Login form. @@ -103,10 +104,13 @@ ${userBlurb} * @param {String=} options.manager.logoUrl * @param {Object} options.dingus * @param {String} options.dingus.selfBaseUrl + * @param {() => {}} appCb * @returns {String} */ -module.exports = (ctx, options) => { +module.exports = (ctx, options, appCb = () => {}) => { + const pagePathLevel = 1; const htmlOptions = { + pageIdentifier: 'login', pageTitle: options.manager.pageTitle, logoUrl: options.manager.logoUrl, footerEntries: options.manager.footerEntries, @@ -115,11 +119,13 @@ module.exports = (ctx, options) => { indieAuthBlurb: options.authenticator.indieAuthBlurb, userBlurb: options.authenticator.userBlurb, }; + appCb(pagePathLevel, ctx, htmlOptions); + sessionNavLinks(pagePathLevel, ctx, htmlOptions); const mainContent = [ ...(options.authenticator.loginBlurb || []), indieAuthURLTrySecureFirstScript(ctx, htmlOptions), indieAuthSection(ctx, htmlOptions), userSection(ctx, htmlOptions), ]; - return th.htmlPage(2, ctx, htmlOptions, mainContent); + return th.htmlPage(pagePathLevel, ctx, htmlOptions, mainContent); }; \ No newline at end of file