const th = require('./template-helper');
+function hAppSection(pageTitle, logoUrl) {
+ return ` <section class="h-app hidden">
+ <h2>h-app Information for IndieAuth Logins</h2>
+ <img src="${logoUrl}" class="u-logo">
+ <a href="" class="u-url p-name">${pageTitle}</a>
+ <p class="p-summary">
+ This is a WebSub Hub service, facilitating content distribution.
+ Authenticated users may view details of any syndications related to their profile.
+ </p>
+ </section>`;
+}
+
function aboutSection() {
return ` <section class="about">
<h2>What</h2>
</div>
<div>
<h3>Publishing Updates</h3>
- To notify the Hub that a topic's content has been updated and should be distributed to subscribers, send a <code>POST</code> request with Form Data (<code>application/x-www-form-urlencoded</code>):
+ 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 <code>POST</code> request with Form Data (<code>application/x-www-form-urlencoded</code>):
<ul>
<li>
<code>hub.mode</code> set to <code>publish</code>
const contactHTML = options.adminContactHTML;
const footerEntries = options.manager.footerEntries;
const hubURL = options.dingus.selfBaseUrl || '<s>https://hub.example.com/</s>';
- const headElements = [];
- const navLinks = [];
- const mainContent = [
+ const navLinks = [{
+ href: 'admin/',
+ text: 'Admin',
+ }];
+ const htmlOptions = {
+ pageTitle,
+ logoUrl: options.manager.logoUrl,
+ footerEntries,
+ navLinks,
+ };
+ const content = [
+ '<script>0</script>', // This fixes a layout rendering flash on load in FF; do not know why this works but it does.
aboutSection(),
usageSection(isPublicHub, hubURL),
contactSection(contactHTML),
+ hAppSection(pageTitle, options.manager.logoUrl),
];
- return th.htmlTemplate(1, pageTitle, headElements, navLinks, mainContent, footerEntries,
- );
+ return th.htmlPage(1, ctx, htmlOptions, content);
};
\ No newline at end of file