projects
/
websub-hub
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update html template dependency and templates
[websub-hub]
/
src
/
template
/
root-html.js
diff --git
a/src/template/root-html.js
b/src/template/root-html.js
index fc655c01200b2f94cacec37d82d7847d044ca108..9496c7e8a3a5a666d5be34591380760bb35f81a4 100644
(file)
--- a/
src/template/root-html.js
+++ b/
src/template/root-html.js
@@
-2,10
+2,10
@@
const th = require('./template-helper');
const th = require('./template-helper');
-function hAppSection(pageTitle) {
- return ` <section
class="h-app hidden
">
+function hAppSection(pageTitle
, logoUrl
) {
+ return ` <section
hidden class="h-app
">
<h2>h-app Information for IndieAuth Logins</h2>
<h2>h-app Information for IndieAuth Logins</h2>
- <img src="
static/favicon.ico
" class="u-logo">
+ <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.
<a href="" class="u-url p-name">${pageTitle}</a>
<p class="p-summary">
This is a WebSub Hub service, facilitating content distribution.
@@
-149,17
+149,21
@@
module.exports = (ctx, options) => {
const contactHTML = options.adminContactHTML;
const footerEntries = options.manager.footerEntries;
const hubURL = options.dingus.selfBaseUrl || '<s>https://hub.example.com/</s>';
const contactHTML = options.adminContactHTML;
const footerEntries = options.manager.footerEntries;
const hubURL = options.dingus.selfBaseUrl || '<s>https://hub.example.com/</s>';
- const headElements = [];
const navLinks = [{
href: 'admin/',
text: 'Admin',
}];
const navLinks = [{
href: 'admin/',
text: 'Admin',
}];
- const mainContent = [
+ const htmlOptions = {
+ pageTitle,
+ logoUrl: options.manager.logoUrl,
+ footerEntries,
+ navLinks,
+ };
+ const content = [
aboutSection(),
usageSection(isPublicHub, hubURL),
contactSection(contactHTML),
aboutSection(),
usageSection(isPublicHub, hubURL),
contactSection(contactHTML),
- hAppSection(pageTitle),
+ hAppSection(pageTitle
, options.manager.logoUrl
),
];
];
- return th.htmlTemplate(ctx, 0, pageTitle, headElements, navLinks, mainContent, footerEntries,
- );
+ return th.htmlPage(0, ctx, htmlOptions, content);
};
\ No newline at end of file
};
\ No newline at end of file