Repo created
This commit is contained in:
parent
75dc487a7a
commit
39c29d175b
6317 changed files with 388324 additions and 2 deletions
22
docs/assets/theme/navigation.js
Normal file
22
docs/assets/theme/navigation.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
document.querySelectorAll('.sidebar-scrollbox .section a[href*="adr"]').forEach(el => {
|
||||
if (el.getAttribute('href').includes('index.html')) {
|
||||
return; // Skip processing for index.html
|
||||
}
|
||||
|
||||
let textNodes = [...el.childNodes].filter(node => node.nodeType === Node.TEXT_NODE && node.nodeValue.trim().length > 0);
|
||||
|
||||
if (textNodes.length > 0) {
|
||||
let textNode = textNodes[0]; // First text node (ignoring elements like <strong>)
|
||||
let text = textNode.nodeValue.trim();
|
||||
|
||||
if (text.length >= 4) {
|
||||
let span = document.createElement("span");
|
||||
span.classList.add("number");
|
||||
span.textContent = text.substring(0, 4);
|
||||
|
||||
textNode.nodeValue = text.substring(4); // Remove first 4 chars from original text node
|
||||
|
||||
el.insertBefore(span, textNode); // Insert the styled first 4 characters before the rest
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue