re-add qtquick types and qs examples links to nav

This commit is contained in:
outfoxxed 2024-10-24 20:17:34 -07:00
parent a5c4272469
commit bc01642fa4
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 36 additions and 22 deletions

View file

@ -1,10 +1,22 @@
---
import { Icon } from "astro-icon/components";
interface Props {
title: string;
link: string;
current?: boolean;
showIcon?: boolean;
}
const { title, link, current } = Astro.props;
const { title, link, current, showIcon } = Astro.props;
---
<a class=`nav-component nav-item nav-link ${current ? "nav-current" : ""}` href={link}>{title}</a>
<a class=`nav-component nav-item nav-link ${current ? "nav-current" : ""}` href={link}>
{ showIcon ? (
<div>
<Icon name="link"/>
{title}
</div>
) : (
title
)}
</a>

View file

@ -10,6 +10,7 @@ const { currentRoute, currentModule, currentClass } = Astro.props;
import { getTypeData } from "@config/io/generateTypeData";
import { groupRoutes } from "@config/io/helpers";
import Tree from "./Tree.astro";
import Link from "./Link.astro";
const routes = await getTypeData();
const groupedRoutes = groupRoutes(routes);
@ -48,4 +49,14 @@ const types = {
<nav class="navtree">
<Tree {...configuration}/>
<Tree {...types}/>
<Link
title="QtQuick Types"
link="https://doc.qt.io/qt-6/qtquick-qmlmodule.html"
showIcon={true}
/>
<Link
title="Quickshell Examples"
link="https://git.outfoxxed.me/outfoxxed/quickshell-examples"
showIcon={true}
/>
</nav>