mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-20 07:28:11 -07:00
website_next: part 2
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/** @param {string} title */
|
||||
function groupName(title) {
|
||||
return title.toLowerCase().replace(/[^a-z0-9]+/g, "-");
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} parent
|
||||
* @param {string} title
|
||||
* @param {Node[]} children
|
||||
*/
|
||||
export function appendPane(parent, title, children) {
|
||||
if (!children.length) return;
|
||||
|
||||
const section = document.createElement("section");
|
||||
|
||||
section.dataset.group = groupName(title);
|
||||
section.append(...children);
|
||||
parent.append(section);
|
||||
}
|
||||
Reference in New Issue
Block a user