mirror of
https://github.com/xHyroM/website.git
synced 2024-11-22 06:51:05 +01:00
fix(components/widgets/docs): remove marker from heading
This commit is contained in:
parent
9cd69c442a
commit
ab51d7f40d
2 changed files with 35 additions and 27 deletions
|
@ -4,13 +4,16 @@ export interface Docs {
|
|||
|
||||
export interface SidebarItem {
|
||||
text: string;
|
||||
header?: boolean;
|
||||
link?: string;
|
||||
items: SidebarItem[] & {
|
||||
link: string;
|
||||
}[]
|
||||
}
|
||||
|
||||
export const docs: Docs = {
|
||||
sidebar: [
|
||||
{ text: "Discord Experiments API", header: true },
|
||||
{
|
||||
text: "Discord Experiments API",
|
||||
items: [
|
||||
{
|
||||
text: "Introduction",
|
||||
link: "/docs/discord-experiments-api/introduction",
|
||||
|
@ -28,4 +31,6 @@ export const docs: Docs = {
|
|||
link: "/docs/discord-experiments-api/stats",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -42,17 +42,20 @@ const getLinkClasses = (link: SidebarItem) => {
|
|||
aria-labelledby="grid-left"
|
||||
class="bg-dark-r w-64 -translate-x-full p-4 transition-transform duration-200 md:visible md:translate-x-0 md:bg-transparent"
|
||||
>
|
||||
<ul class="border-l border-dark-300">
|
||||
<ul>
|
||||
{
|
||||
docs.sidebar.map((item) =>
|
||||
item.header ? (
|
||||
<li class="mt-4 pl-4 font-semibold text-white">{item.text}</li>
|
||||
) : (
|
||||
docs.sidebar.map(({ text, items }) => (
|
||||
<>
|
||||
<li class="mt-4 font-semibold text-white">{text}</li>
|
||||
<ul class="border-l border-dark-300">
|
||||
{items.map((item) => (
|
||||
<li class={getLinkClasses(item)}>
|
||||
<a href={item.link}>{item.text}</a>
|
||||
</li>
|
||||
)
|
||||
)
|
||||
))}
|
||||
</ul>
|
||||
</>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in a new issue