3 const { TemplateHelper: th
} = require('@squeep/html-template-helper');
5 function mainContent() {
8 \t<a href="./login">Try Again?</a>
14 * Render any errors from attempting IndieAuth.
16 * @param {String[]} ctx.errors
17 * @param {Object} options
18 * @param {Object} options.manager
19 * @param {String} options.manager.pageTitle
20 * @param {Object} options.dingus
21 * @param {String} options.dingus.selfBaseUrl
24 module
.exports
= (ctx
, options
) => {
26 pageTitle: options
.manager
.pageTitle
,
27 logoUrl: options
.manager
.logoUrl
,
28 footerEntries: options
.manager
.footerEntries
,
30 '<p>Problems were encountered while trying to authenticate your profile URL.</p>',
33 // Ensure there is always an error to report, even if we do not have one, as we ended up here somehow.
34 if (!ctx
.errors
|| !ctx
.errors
.length
) {
36 'Unknown Error — we are not sure what just happened',
39 return th
.htmlPage(2, ctx
, htmlOptions
, mainContent());