Skip to content

Commit

Permalink
skiplinks
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet committed Mar 11, 2024
1 parent 9e42ff7 commit 89f3e92
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import Link from "next/link";
import { useRouter } from "next/router";

import { createEmotionSsrAdvancedApproach } from "tss-react/next";
import { useStyles } from "tss-react/dsfr";
import { createNextDsfrIntegrationApi } from "@codegouvfr/react-dsfr/next-pagesdir";
import { Footer } from "@codegouvfr/react-dsfr/Footer";
import { fr } from "@codegouvfr/react-dsfr";
import { Header } from "@codegouvfr/react-dsfr/Header";
import { headerFooterDisplayItem } from "@codegouvfr/react-dsfr/Display";
import { init } from "@socialgouv/matomo-next";
import { SkipLinks } from "@codegouvfr/react-dsfr/SkipLinks";
import { MuiDsfrThemeProvider } from "@codegouvfr/react-dsfr/mui";
import { useStyles } from "tss-react/dsfr";

import { init } from "@socialgouv/matomo-next";

declare module "@codegouvfr/react-dsfr/next-pagesdir" {
interface RegisterLink {
Expand Down Expand Up @@ -136,6 +138,22 @@ const Layout = ({ children }: { children: ReactNode }) => {
<link rel="icon" href="/favicon.ico" />
<meta name="description" content="Template Next.js beta.gouv.fr" />
</Head>
<SkipLinks
links={[
{
anchor: "#fr-header-main-navigation",
label: "Menu",
},
{
anchor: "#content",
label: "Contenu",
},
{
anchor: "#fr-footer",
label: "Pied de page",
},
]}
/>
<Header
brandTop={brandTop}
serviceTitle="Nom du service numérique"
Expand Down Expand Up @@ -173,7 +191,10 @@ const Layout = ({ children }: { children: ReactNode }) => {
]}
quickAccessItems={[headerFooterDisplayItem]}
/>
<div className={fr.cx("fr-container", "fr-container--fluid", "fr-p-5w")}>
<div
className={fr.cx("fr-container", "fr-container--fluid", "fr-p-5w")}
id="content"
>
{children}
</div>
<Footer
Expand Down

0 comments on commit 89f3e92

Please sign in to comment.