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 {
|
export interface SidebarItem {
|
||||||
text: string;
|
text: string;
|
||||||
header?: boolean;
|
items: SidebarItem[] & {
|
||||||
link?: string;
|
link: string;
|
||||||
|
}[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export const docs: Docs = {
|
export const docs: Docs = {
|
||||||
sidebar: [
|
sidebar: [
|
||||||
{ text: "Discord Experiments API", header: true },
|
{
|
||||||
|
text: "Discord Experiments API",
|
||||||
|
items: [
|
||||||
{
|
{
|
||||||
text: "Introduction",
|
text: "Introduction",
|
||||||
link: "/docs/discord-experiments-api/introduction",
|
link: "/docs/discord-experiments-api/introduction",
|
||||||
|
@ -28,4 +31,6 @@ export const docs: Docs = {
|
||||||
link: "/docs/discord-experiments-api/stats",
|
link: "/docs/discord-experiments-api/stats",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,17 +42,20 @@ const getLinkClasses = (link: SidebarItem) => {
|
||||||
aria-labelledby="grid-left"
|
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"
|
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) =>
|
docs.sidebar.map(({ text, items }) => (
|
||||||
item.header ? (
|
<>
|
||||||
<li class="mt-4 pl-4 font-semibold text-white">{item.text}</li>
|
<li class="mt-4 font-semibold text-white">{text}</li>
|
||||||
) : (
|
<ul class="border-l border-dark-300">
|
||||||
|
{items.map((item) => (
|
||||||
<li class={getLinkClasses(item)}>
|
<li class={getLinkClasses(item)}>
|
||||||
<a href={item.link}>{item.text}</a>
|
<a href={item.link}>{item.text}</a>
|
||||||
</li>
|
</li>
|
||||||
)
|
))}
|
||||||
)
|
</ul>
|
||||||
|
</>
|
||||||
|
))
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in a new issue