Skip to content
Snippets Groups Projects
Commit 7f9327ac authored by Rene Roesner's avatar Rene Roesner
Browse files

planning#320: Added toc as sidemenu

parent dd5d25da
No related branches found
No related tags found
1 merge request!160fit-connect/planning#320 Erweiterung FAQ
...@@ -2,3 +2,11 @@ button { ...@@ -2,3 +2,11 @@ button {
border: none; border: none;
background: transparent; background: transparent;
} }
.table-of-contents a {
color: black;
&:hover {
color: #3578e5;
text-decoration: none;
}
}
\ No newline at end of file
...@@ -38,58 +38,59 @@ export default function FAQList() { ...@@ -38,58 +38,59 @@ export default function FAQList() {
}) })
return ( return (
<section> <div className="">
<div className="max-w-6xl mx-auto px-4 sm:px-6">
<div className="py-12 md:py-20 border-t border-gray-200"> <div className="py-12 md:py-20 border-t border-gray-200">
{/* Section header */} <div className="flex">
<div className="max-w-3xl mx-auto text-center pb-10"> <div className="toc-inline flex-start pl-0 pr-12">
<h2 className="h2" id="FAQs"> <TOCInline toc={toc} minHeadingLevel={1} maxHeadingLevel={2} />
FAQs
</h2>
</div>
<div className="toc-inline mb-10">
<TOCInline toc={toc} minHeadingLevel={1} maxHeadingLevel={2} />
</div>
{groups.map((group, i) => (
<div key={'g' + i}>
<div className="max-w-3xl mx-auto text-center pb-5" key={i}>
<a className="faq-anchor" id={group.anchor} />
<h3 className="h3">{group.name}</h3>
</div> </div>
{group.subgroups.map((subgroup, j) => ( <div className="faq mx-auto px-4 sm:px-6">
<div key={'sg' + j}> <div className="max-w-3xl mx-auto text-center pb-10">
<div className="max-w-3xl mx-auto text-center pb-5"> <h2 className="h2" id="FAQs">
<a className="faq-anchor" id={subgroup.anchor} /> FAQs
<h4 className="h4">{subgroup.name}</h4> </h2>
</div> </div>
{groups.map((group, i) => (
<div key={'g' + i}>
<div className="max-w-3xl mx-auto text-center pb-5" key={i}>
<a className="faq-anchor" id={group.anchor} />
<h3 className="h3">{group.name}</h3>
</div>
<ul className="mx-auto"> {group.subgroups.map((subgroup, j) => (
{subgroup.items.map((item, k) => ( <div key={'sg' + j}>
<FaqItem title={item.title} key={'i' + k}> <div className="max-w-3xl mx-auto text-center pb-5">
<a className="faq-anchor" id={subgroup.anchor + k} /> <a className="faq-anchor" id={subgroup.anchor} />
<JsxParser <h4 className="h4">{subgroup.name}</h4>
bindings={{ </div>
JSON: JSON,
}} <ul className="mx-auto">
components={{ Link, ApiLink }} {subgroup.items.map((item, k) => (
jsx={item.content} <FaqItem title={item.title} key={'i' + k}>
/> <a className="faq-anchor" id={subgroup.anchor + k} />
</FaqItem> <JsxParser
bindings={{
JSON: JSON,
}}
components={{ Link, ApiLink }}
jsx={item.content}
/>
</FaqItem>
))}
<span
className="block border-t border-gray-300 mb-10"
aria-hidden="true"
/>
</ul>
</div>
))} ))}
<span </div>
className="block border-t border-gray-300 mb-10" ))}
aria-hidden="true" </div>
/> {/* Section header */}
</ul> </div>
</div>
))}
</div>
))}
</div> </div>
</div> </div>
</section>
) )
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment