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:
@@ -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'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user