refactor of authentication and html-templates into separate modules
[websub-hub] / src / template / admin-topic-details-html.js
index e03918910d935f98f9c70f6cd1720d5d545b8f59..0c281e48086ef4514ea75996ec62577b0823d66d 100644 (file)
@@ -14,7 +14,7 @@ const th = require('./template-helper');
  */
 module.exports = (ctx, options) => {
   const pageTitle = `${options.manager.pageTitle} - Topic Details`;
-  const headElements = [];
+  const logoUrl = options.manager.logoUrl;
   const navLinks = [
     {
       href: '..',
@@ -25,7 +25,16 @@ module.exports = (ctx, options) => {
   if (!ctx.subscriptions) {
     ctx.subscriptions = [];
   }
-  return th.htmlTemplate(ctx, 2, pageTitle, headElements, navLinks, [
+
+  const htmlOptions = {
+    pageTitle,
+    logoUrl,
+    navLinks,
+    footerEntries,
+  };
+
+  const content = [
+    '<script>0</script>', // This fixes a layout rendering flash on load in FF; do not know why this works but it does.
     `      <section class="topics">
         <table>
           <thead>`,
@@ -47,5 +56,7 @@ module.exports = (ctx, options) => {
     `          </tbody>
         </table>
       </section>`,
-  ], footerEntries);
+  ];
+
+  return th.htmlPage(2, htmlOptions, content);
 };
\ No newline at end of file