I've been fiddling with styling for the DomTerm manual using texinfo-js.
One thing that seems to be needed is a way to  customize the top-left header
of the sidebar.  The cleanest way may be adding a customization "hook" to
info.js allows you to insert arbitrary children of the <a> element.
See attachment.

For example this puts text and logo there:

function sidebarLinkAppendContents(a, h1) {
    a.innerHTML = "<div class='logo'><span>DomTerm terminal emulator</span><img 
src='images/domterm1.svg'/></div>"
}

The result (which needs some work) can be viewed here:
https://per.bothner.com/tmp/DomTerm-txjs

You may notice this is rather more polished than the earlier version,
as I've made various other styling tweaks.  (So far nothing else that
requires changes to the texinfo source.)
--
        --Per Bothner
[email protected]   http://per.bothner.com/
diff --git a/js/info.js b/js/info.js
index 035417b6d5..bf41ab669d 100644
--- a/js/info.js
+++ b/js/info.js
@@ -1231,11 +1231,16 @@
           a.setAttribute ("href", config.INDEX_NAME);
           a.setAttribute ("id", config.INDEX_ID);
           header.appendChild (a);
-          var div = document.createElement ("div");
-          a.appendChild (div);
-          var span = document.createElement ("span");
-          span.textContent = h1.textContent;
-          div.appendChild (span);
+          if (window.sidebarLinkAppendContents)
+            window.sidebarLinkAppendContents(a, h1.textContent);
+          else
+            {
+              var div = document.createElement ("div");
+              a.appendChild (div);
+              var span = document.createElement ("span");
+              span.textContent = h1.textContent;
+              div.appendChild (span);
+            }
           elem.parentElement.insertBefore (header, elem);
         }
     }

Reply via email to