3 const th
= require('./template-helper');
5 function errorsSection(ctx
) {
6 return (ctx
.errors
&& ctx
.errors
.length
) ? ` <section class="errors">
8 <p>Problems were encountered while trying to authenticate your profile URL.</p>
10 ctx
.errors
.map((error
) => `<li>${error}</li>`).join('\n') + `
14 <a href="./login">Try Again?</a>
20 * Render any errors from attempting IndieAuth.
22 * @param {String[]} ctx.errors
23 * @param {Object} options
24 * @param {Object} options.manager
25 * @param {String} options.manager.pageTitle
26 * @param {Object} options.dingus
27 * @param {String} options.dingus.selfBaseUrl
30 module
.exports
= (ctx
, options
) => {
31 const pageTitle
= options
.manager
.pageTitle
;
32 const footerEntries
= options
.manager
.footerEntries
;
33 const headElements
= [];
38 return th
.htmlTemplate(ctx
, 2, pageTitle
, headElements
, navLinks
, mainContent
, footerEntries
);