on master help sign in
visually differentiate TOC document title
commit53129e35e7a5dcbfbec82eec93b4fda7aed867be authorGavin Atkinson <gvnatknsn@protonmail.com> dateSat 11 Sep 2021, 21:52 (5 years ago) parent664a056
1 file changed+5−2
components/TableOfContents.js+5−2
components/TableOfContents.js+5−2
@@ -52,9 +52,12 @@ const useHeadingsData = (noh3s) => {
5252
5353const Headings = ({ headings, activeId }) => (
5454 <ul>
55− {headings.map((heading) => (
55+ {headings.map((heading, index) => (
5656 <li key={heading.id}>
57− <a className="font-semibold" href={`#${heading.id}`}>
57+ <a
58+ className={index === 0 ? "font-bold" : "font-medium"}
59+ href={`#${heading.id}`}
60+ >
5861 {heading.title}
5962 </a>
6063 {heading.items.length > 0 && (