-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arnaud AMBROSELLI
committed
May 21, 2024
1 parent
ba6c924
commit 26ffd8a
Showing
7 changed files
with
11,710 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,43 @@ | ||
import { DsfrProvider } from "@codegouvfr/react-dsfr/next-appdir/DsfrProvider" | ||
import Head from "next/head" | ||
import { StartDsfr } from "~/app/StartDsfr" | ||
import { DsfrHead } from "@codegouvfr/react-dsfr/next-appdir/DsfrHead" | ||
import Link from "next/link" | ||
|
||
/* | ||
Note: normally we can't use <Head> with next 14 | ||
but here we don't want to use react dsfr in our whole appn because it's breaking all the styles | ||
so we use it only in this nested layout | ||
this breaks the pattern for which it was designed so we need to | ||
- use <Head> | ||
- patch package @codegouvfr/react-dsfr | ||
*/ | ||
export default function Layout({ children }) { | ||
const lang = "fr" | ||
return <DsfrProvider lang={lang}>{children}</DsfrProvider> | ||
return ( | ||
<> | ||
<Head> | ||
<StartDsfr /> | ||
<DsfrHead | ||
Link={Link} | ||
preloadFonts={[ | ||
//"Marianne-Light", | ||
//"Marianne-Light_Italic", | ||
"Marianne-Regular", | ||
//"Marianne-Regular_Italic", | ||
"Marianne-Medium", | ||
//"Marianne-Medium_Italic", | ||
"Marianne-Bold", | ||
//"Marianne-Bold_Italic", | ||
//"Spectral-Regular", | ||
//"Spectral-ExtraBold" | ||
]} | ||
/> | ||
</Head> | ||
<DsfrProvider lang={lang}>{children}</DsfrProvider> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.