0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 09:32:51 +00:00

Add identifier to ToC pages in header nav

This commit is contained in:
G.Ambatte
2025-01-09 12:53:52 +13:00
parent a9823d39e2
commit a72f47df46

View File

@@ -16,9 +16,13 @@ const HeaderNav = React.forwardRef(({}, pagesRef)=>{
elements.forEach((el)=>{
if(el.className.match(/\bpage\b/)) {
let text = `Page ${el.id.slice(1)}`;
if(el.querySelector('.toc')){
text += ' - Contents';
};
navList.push({
depth : 0,
text : `Page ${el.id.slice(1)}`,
text : text,
link : el.id,
className : 'pageLink'
});