X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=src%2Ftemplate%2Froot-html.js;h=fc655c01200b2f94cacec37d82d7847d044ca108;hb=d0444b4b0ee8166d911e6b227218d110eb7eddf1;hp=d1939b84cd6bb690c07c0c65cd5cd7bbab6dd9c7;hpb=38aba0869dc3ade99d439e74cbc6239b4fa1f632;p=websub-hub diff --git a/src/template/root-html.js b/src/template/root-html.js index d1939b8..fc655c0 100644 --- a/src/template/root-html.js +++ b/src/template/root-html.js @@ -2,6 +2,18 @@ const th = require('./template-helper'); +function hAppSection(pageTitle) { + return ` `; +} + function aboutSection() { return `

What

@@ -46,6 +58,15 @@ function usageSection(isPublicHub, hubURL) { +
  • + Ideally, these should be combined in one header. +
    +
    Example:
    + + Link: <${hubURL}>; rel="hub", <https://example.com/feed/>; rel="self" + +
    +
  • @@ -73,15 +94,21 @@ function usageSection(isPublicHub, hubURL) {

    Publishing Updates

    - Send a POST request to this hub with Form Data: + 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): +
    +
    Example:
    + + curl ${hubURL} -d'hub.mode=publish' -d'hub.url=https://example.com/blog_one/feed' -d'hub.url=https://example.com/blog_two/feed' + +
    ` : `

    Private Hub

    @@ -120,12 +147,19 @@ module.exports = (ctx, options) => { const pageTitle = options.manager.pageTitle; const isPublicHub = options.manager.publicHub; const contactHTML = options.adminContactHTML; + const footerEntries = options.manager.footerEntries; const hubURL = options.dingus.selfBaseUrl || 'https://hub.example.com/'; const headElements = []; - const navLinks = []; - return th.htmlTemplate(1, pageTitle, headElements, navLinks, [ + const navLinks = [{ + href: 'admin/', + text: 'Admin', + }]; + const mainContent = [ aboutSection(), usageSection(isPublicHub, hubURL), contactSection(contactHTML), - ]); + hAppSection(pageTitle), + ]; + return th.htmlTemplate(ctx, 0, pageTitle, headElements, navLinks, mainContent, footerEntries, + ); }; \ No newline at end of file