* @param {Number} seconds
* @returns {String}
*/
- const secondsToPeriod = (seconds) => {
+const secondsToPeriod = (seconds) => {
let value = seconds;
const result = [];
<ol>
${navLinks.map((l) => renderNavLink(l)).join('\n')}
</ol>`
- : '') + `
+ : '') + `
</nav>
</header>
<main>`;
/**
* Close the main section and finish off with boilerplate.
+ * @param {String[]} footerEntries
* @returns {String}
*/
-function htmlFooter() {
+function htmlFooter(footerEntries = []) {
return ` </main>
- <footer>
- <ol>
- <li>
- <a href="https://git.squeep.com/?p=websub-hub;a=tree">Development Repository</a>
- </li>
- <li>
- <a href="https://squeep.com/">A Squeep Infrastructure Component</a>
- </li>
- <li>
- ©<time datetime="2021">ⅯⅯⅩⅩⅠ</time>
- </li>
- </ol>
+ <footer>` +
+ (footerEntries.length ? `
+ <ol>` + footerEntries.map((f) => ` <li>${f}</li>`).join('\n') + `
+ </ol>`
+ : '') + `
</footer>`;
}
* @param {String[]} headElements
* @param {Object[]} navLinks
* @param {String[]} main
+ * @param {String[]} footerEntries
* @returns {String}
*/
-function htmlTemplate(pagePathLevel, pageTitle, headElements = [], navLinks = [], main = []) {
+function htmlTemplate(pagePathLevel, pageTitle, headElements = [], navLinks = [], main = [], footerEntries = []) {
return [
htmlHead(pagePathLevel, pageTitle, headElements),
htmlHeader(pageTitle, navLinks),
...main,
- htmlFooter(),
+ htmlFooter(footerEntries),
htmlTail(),
].join('\n');
}