X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=src%2Ftemplate%2Froot-html.js;h=9496c7e8a3a5a666d5be34591380760bb35f81a4;hb=17b4ff9c1974842c02071d2cd02144d2e5a99eb5;hp=c68d52a33313810d581029eb2fabf456429a4a54;hpb=9915fd047ecd95692e53d93ddb3ad25ae1680925;p=websub-hub diff --git a/src/template/root-html.js b/src/template/root-html.js index c68d52a..9496c7e 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, logoUrl) { + 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

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