refactor(nav): format navigation types consistently
This commit is contained in:
parent
b3b75ba5e7
commit
85c2d26c81
@ -104,6 +104,11 @@ export const navigation: NavigationSection[] = [
|
||||
type: navigationsTypes.DOCUMENTATIONS,
|
||||
position: "auto",
|
||||
links: [
|
||||
{
|
||||
title: "HTML",
|
||||
href: "/docs/html",
|
||||
subitems: [{ title: "Introduction", href: "/docs/html" }],
|
||||
},
|
||||
{
|
||||
title: "React",
|
||||
href: "/docs/react",
|
||||
@ -121,11 +126,6 @@ export const navigation: NavigationSection[] = [
|
||||
{ title: "Le hook useReducer", href: "/docs/react/use-reducer" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "HTML",
|
||||
href: "/docs/html",
|
||||
subitems: [{ title: "Introduction", href: "/docs/html" }],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -152,12 +152,20 @@ export const navigation: NavigationSection[] = [
|
||||
},
|
||||
];
|
||||
|
||||
export function doesLinkSubitemExist(link: NavigationLink, subitemHref: string): boolean {
|
||||
export function doesLinkSubitemExist(
|
||||
link: NavigationLink,
|
||||
subitemHref: string,
|
||||
): boolean {
|
||||
return link.subitems.some((subitem) => subitem.href === subitemHref);
|
||||
}
|
||||
|
||||
export function findNavigationLink(namespace: string, href?: string): NavigationLink | undefined {
|
||||
const currentUrl = `/${namespace}/${href}`.replace(/\/+/g, "/").replace(/\/$/, "");
|
||||
export function findNavigationLink(
|
||||
namespace: string,
|
||||
href?: string,
|
||||
): NavigationLink | undefined {
|
||||
const currentUrl = `/${namespace}/${href}`
|
||||
.replace(/\/+/g, "/")
|
||||
.replace(/\/$/, "");
|
||||
|
||||
const foundLink = navigation
|
||||
.flatMap((section) => section.links)
|
||||
|
||||
8
app/pages/docs/html/attributs/+Page.mdx
Normal file
8
app/pages/docs/html/attributs/+Page.mdx
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Exploration approfondie des attributs HTML : utilisation, explications et exemples pratiques
|
||||
description: Parlons un peu de HTML, l'incontournable langage de balisage utilisé pour créer des pages web.
|
||||
tags: []
|
||||
---
|
||||
|
||||
import Callout from "@/components/Callout";
|
||||
|
||||
8
app/pages/docs/html/balise-head/+Page.mdx
Normal file
8
app/pages/docs/html/balise-head/+Page.mdx
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Comprendre la fonctionnalité et l'importance de la balise \<head\> dans une page HTML
|
||||
description: Parlons un peu de HTML, l'incontournable langage de balisage utilisé pour créer des pages web.
|
||||
tags: []
|
||||
---
|
||||
|
||||
import Callout from "@/components/Callout";
|
||||
|
||||
8
app/pages/docs/html/balises-de-base/+Page.mdx
Normal file
8
app/pages/docs/html/balises-de-base/+Page.mdx
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Découverte des balises HTML courantes pour structurer une page web
|
||||
description: Parlons un peu de HTML, l'incontournable langage de balisage utilisé pour créer des pages web.
|
||||
tags: []
|
||||
---
|
||||
|
||||
import Callout from "@/components/Callout";
|
||||
|
||||
8
app/pages/docs/html/formulaires/+Page.mdx
Normal file
8
app/pages/docs/html/formulaires/+Page.mdx
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Créer des formulaires interactifs avec HTML : éléments, types d'entrées et validation de données
|
||||
description: Parlons un peu de HTML, l'incontournable langage de balisage utilisé pour créer des pages web.
|
||||
tags: []
|
||||
---
|
||||
|
||||
import Callout from "@/components/Callout";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user