diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 686eaec..33b30a8 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -38,13 +38,21 @@ {% include components/mermaid.html %} {% endif %} + const tables = document.querySelectorAll("table"); + const addStickyHeaders = (tables) => { + tables.forEach((table) => { + if (table.offsetHeight >= 900) { + table.classList.add("js-table") + } + }) + }; + addStickyHeaders(tables); + document.addEventListener('DOMContentLoaded', () => { + const tableElements = document.querySelectorAll('.js-table'); + tableElements.forEach(tableElement => { + new window.StickyTable(tableElement); + }) + }); + \ No newline at end of file diff --git a/docs/_layouts/minimal.html b/docs/_layouts/minimal.html index 6213556..1ad8366 100644 --- a/docs/_layouts/minimal.html +++ b/docs/_layouts/minimal.html @@ -31,13 +31,21 @@ {% include components/mermaid.html %} {% endif %} \ No newline at end of file