X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Ftemplate%2Fia-html.js;h=d3508e1466ce01c54e71833b9749c0cfdcd0d021;hb=9c8e775e5ab96a1788f535760bfa72205c430d15;hp=8a27479eb8426e4a3df658f9b71d382414754556;hpb=786f4aa122c3c3a1c1c8224abacd12d0ca079cd0;p=squeep-authentication-module diff --git a/lib/template/ia-html.js b/lib/template/ia-html.js index 8a27479..d3508e1 100644 --- a/lib/template/ia-html.js +++ b/lib/template/ia-html.js @@ -3,9 +3,21 @@ const { TemplateHelper: th } = require('@squeep/html-template-helper'); const { sessionNavLinks } = require('./helpers'); +/** + * @alias {object} Context + */ + +/** + * @alias {object} HtmlOptions + */ + +/** + * @typedef {import('../session-manager').AppTemplateCallback} AppTemplateCallback + */ + /** * - * @returns {String} + * @returns {string[]} section */ function mainContent() { return [ @@ -15,17 +27,17 @@ function mainContent() { ]; } + /** * Render any errors from attempting IndieAuth. - * @param {Object} ctx - * @param {String[]} ctx.errors - * @param {Object} options - * @param {Object} options.manager - * @param {String} options.manager.pageTitle - * @param {Object} options.dingus - * @param {String} options.dingus.selfBaseUrl - * @param {(pagePathLevel, ctx, htmlOptions) => {void}} appCb - * @returns {String} + * @param {Context} ctx context + * @param {object} options options + * @param {object} options.manager manager options + * @param {string} options.manager.pageTitle page title + * @param {object} options.dingus dingus options + * @param {string} options.dingus.selfBaseUrl base url + * @param {AppTemplateCallback} appCb function to mogrify htmlOptions + * @returns {string} page */ module.exports = (ctx, options, appCb = () => {}) => { const pagePathLevel = 1;