feat/analytics #9

Merged
GauthierWebDev merged 29 commits from feat/analytics into main 2025-04-18 15:05:51 +00:00
2 changed files with 18 additions and 1 deletions
Showing only changes of commit 8a393c53bf - Show all commits

View File

@ -161,6 +161,7 @@ export function Navigation({
onLinkClick?: React.MouseEventHandler<HTMLAnchorElement>;
}) {
const firstSections = navigation.filter((section) => section.position === "start");
const lastSections = navigation.filter((section) => section.position === "end");
const filteredSections = navigation
.filter((section) => section.position === "auto" || section.position === undefined)
@ -192,6 +193,12 @@ export function Navigation({
))}
</li>
))}
<li>
<h2 className="font-display font-bold text-base text-slate-900 dark:text-white">{lastSections[0]?.type}</h2>
{lastSections.map((section) => (
<NavigationItem key={section.title} section={section} onLinkClick={onLinkClick} />
))}
</li>
</ul>
</nav>
);

View File

@ -2,12 +2,13 @@ const navigationsTypes = {
GLOBAL: "👋 Général",
CERTIFICATIONS: "🎓 Certifications",
DOCUMENTATIONS: "📚 Documentations",
OTHER: "🔗 Autres",
};
export type NavigationSection = {
title: string;
type: (typeof navigationsTypes)[keyof typeof navigationsTypes];
position: "start" | "auto";
position: "start" | "end" | "auto";
links: NavigationLink[];
};
@ -47,6 +48,15 @@ export const navigation: NavigationSection[] = [
{ title: "Partages et réutilisations", href: "/docs/communaute/partages", subitems: [] },
],
},
{
title: "Légal",
type: navigationsTypes.OTHER,
position: "end",
links: [
{ title: "Mentions légales", href: "/mentions-legales", subitems: [] },
{ title: "Politique de confidentialité", href: "/politique-de-confidentialite", subitems: [] },
],
},
{
title: "Développeur Web et Web Mobile",
type: navigationsTypes.CERTIFICATIONS,