X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=src%2Ftemplate%2Froot-html.js;h=575d4bcbdf439c0287f1bc565e15fb4d10834ab0;hb=3ca7fccb306d0b23626befc3791ffa360b3db1e7;hp=8797564e54e93b1ef816de4c4e4b6e01269e3b7c;hpb=f10a4ea1e43a9a37306f35677d4d6c7ccb98e894;p=websub-hub
diff --git a/src/template/root-html.js b/src/template/root-html.js
index 8797564..575d4bc 100644
--- a/src/template/root-html.js
+++ b/src/template/root-html.js
@@ -1,7 +1,29 @@
'use strict';
const th = require('./template-helper');
+const { sessionNavLinks } = require('@squeep/authentication-module');
+/**
+ *
+ * @param {string} pageTitle page title
+ * @param {string} logoUrl logo url
+ * @returns {string} element
+ */
+function hAppSection(pageTitle, logoUrl) {
+ return `
+ This is a WebSub Hub service, facilitating content distribution.
+ Authenticated users may view details of any syndications related to their profile.
+ h-app Information for IndieAuth Logins
+
+ ${pageTitle}
+ What
@@ -17,6 +39,12 @@ function aboutSection() {
@@ -82,7 +110,7 @@ function usageSection(isPublicHub, hubURL) {
POST
request with Form Data (application/x-www-form-urlencoded
):
+ To notify the Hub either of a new topic to syndicate, or that a topic's content has been updated and should be distributed to subscribers, send a POST
request with Form Data (application/x-www-form-urlencoded
):
hub.mode
set to publish
@@ -109,6 +137,11 @@ ${usageContent}
`;
}
+/**
+ *
+ * @param {string} contactHTML html
+ * @returns {string} html
+ */
function contactSection(contactHTML) {
let section = '';
if (contactHTML) {
@@ -121,29 +154,37 @@ ${contactHTML}
/**
*
- * @param {Object} ctx
- * @param {Object} options
- * @param {Object} options.manager
- * @param {String} options.adminContactHTML
- * @param {String} options.manager.pageTitle
- * @param {String} options.manager.publicHub
- * @param {Object} options.dingus
- * @param {String} options.dingus.selfBaseUrl
- * @returns {String}
+ * @param {object} ctx context
+ * @param {object} options options
+ * @param {object} options.manager manager options
+ * @param {string} options.adminContactHTML html
+ * @param {string} options.manager.pageTitle title
+ * @param {string} options.manager.publicHub is public
+ * @param {object} options.dingus dingus options
+ * @param {string} options.dingus.selfBaseUrl url
+ * @returns {string} html
*/
module.exports = (ctx, options) => {
+ const pagePathLevel = 0;
const pageTitle = options.manager.pageTitle;
const isPublicHub = options.manager.publicHub;
const contactHTML = options.adminContactHTML;
const footerEntries = options.manager.footerEntries;
const hubURL = options.dingus.selfBaseUrl || '