|
|
|
@ -134,41 +134,43 @@ function Nav({ |
|
|
|
|
: [styles.nav]; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<nav |
|
|
|
|
className={navStyles.join(" ")} |
|
|
|
|
onClick={(event) => event.stopPropagation()} |
|
|
|
|
> |
|
|
|
|
<h1 className={styles.mobileNavTitle}>{pageTitle}</h1> |
|
|
|
|
{sections.map((section, index) => { |
|
|
|
|
const classNames = [styles.navItem]; |
|
|
|
|
<div className={styles.navWrapper}> |
|
|
|
|
<nav |
|
|
|
|
className={navStyles.join(" ")} |
|
|
|
|
onClick={(event) => event.stopPropagation()} |
|
|
|
|
> |
|
|
|
|
<h1 className={styles.mobileNavTitle}>{pageTitle}</h1> |
|
|
|
|
{sections.map((section, index) => { |
|
|
|
|
const classNames = [styles.navItem]; |
|
|
|
|
|
|
|
|
|
if (index === currentIndex) { |
|
|
|
|
classNames.push(styles.selected); |
|
|
|
|
} |
|
|
|
|
if (index === currentIndex) { |
|
|
|
|
classNames.push(styles.selected); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (section.id === READ_ALL_ID) { |
|
|
|
|
classNames.push(styles.readAll); |
|
|
|
|
} |
|
|
|
|
if (section.id === READ_ALL_ID) { |
|
|
|
|
classNames.push(styles.readAll); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div |
|
|
|
|
onClick={() => { |
|
|
|
|
setMobileNavOpen(false); |
|
|
|
|
}} |
|
|
|
|
key={section.id} |
|
|
|
|
> |
|
|
|
|
<Link className={classNames.join(" ")} id={section.id}> |
|
|
|
|
<span className={styles.marker} /> |
|
|
|
|
<div> |
|
|
|
|
{numberedSections && section.id !== READ_ALL_ID |
|
|
|
|
? `${index}. ${section.title}` |
|
|
|
|
: section.title} |
|
|
|
|
</div> |
|
|
|
|
</Link> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
})} |
|
|
|
|
</nav> |
|
|
|
|
return ( |
|
|
|
|
<div |
|
|
|
|
onClick={() => { |
|
|
|
|
setMobileNavOpen(false); |
|
|
|
|
}} |
|
|
|
|
key={section.id} |
|
|
|
|
> |
|
|
|
|
<Link className={classNames.join(" ")} id={section.id}> |
|
|
|
|
<span className={styles.marker} /> |
|
|
|
|
<div> |
|
|
|
|
{numberedSections && section.id !== READ_ALL_ID |
|
|
|
|
? `${index}. ${section.title}` |
|
|
|
|
: section.title} |
|
|
|
|
</div> |
|
|
|
|
</Link> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
})} |
|
|
|
|
</nav> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|