diff --git a/next.config.js b/next.config.js
index fbdafd1dc..3fc4fba55 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,13 +1,13 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
- webpack: config => {
+ webpack: (config) => {
config.module.rules.push({
test: /\.woff2$/,
- type: "asset/resource"
- });
- return config;
- }
+ type: "asset/resource",
+ })
+ return config
+ },
}
module.exports = nextConfig
diff --git a/src/app/(la-fabrique)/a-propos/page.tsx b/src/app/(la-fabrique)/a-propos/page.tsx
new file mode 100644
index 000000000..9e575aedc
--- /dev/null
+++ b/src/app/(la-fabrique)/a-propos/page.tsx
@@ -0,0 +1,9 @@
+import { fr } from "@codegouvfr/react-dsfr"
+
+export default function About() {
+ return (
+
+ À propos de la Fabrique
+
+ )
+}
diff --git a/src/app/(la-fabrique)/equipe/page.tsx b/src/app/(la-fabrique)/equipe/page.tsx
new file mode 100644
index 000000000..ccd1d0b0e
--- /dev/null
+++ b/src/app/(la-fabrique)/equipe/page.tsx
@@ -0,0 +1,9 @@
+import { fr } from "@codegouvfr/react-dsfr"
+
+export default function Team() {
+ return (
+
+ )
+}
diff --git a/src/app/(la-fabrique)/notre-offre/page.tsx b/src/app/(la-fabrique)/notre-offre/page.tsx
new file mode 100644
index 000000000..29a7de682
--- /dev/null
+++ b/src/app/(la-fabrique)/notre-offre/page.tsx
@@ -0,0 +1,9 @@
+import { fr } from "@codegouvfr/react-dsfr"
+
+export default function NotreOffre() {
+ return (
+
+ Ce que vous offre de la Fabrique
+
+ )
+}
diff --git a/src/app/documentation/page.tsx b/src/app/documentation/page.tsx
new file mode 100644
index 000000000..1fd58748f
--- /dev/null
+++ b/src/app/documentation/page.tsx
@@ -0,0 +1,9 @@
+import { fr } from "@codegouvfr/react-dsfr"
+
+export default function Documentation() {
+ return (
+
+ )
+}
diff --git a/src/app/favicon.ico b/src/app/favicon.ico
deleted file mode 100644
index 718d6fea4..000000000
Binary files a/src/app/favicon.ico and /dev/null differ
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index d250d87c3..5f7cbba36 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,19 +1,19 @@
-import "./globals.css"
import type { Metadata } from "next"
-
-import { defaultColorScheme } from "./defaultColorScheme"
+import Link from "next/link"
import { DsfrHead } from "@codegouvfr/react-dsfr/next-appdir/DsfrHead"
import { DsfrProvider } from "@codegouvfr/react-dsfr/next-appdir/DsfrProvider"
import { getHtmlAttributes } from "@codegouvfr/react-dsfr/next-appdir/getHtmlAttributes"
-import { StartDsfr } from "./StartDsfr"
-import Link from "next/link"
-import Header from "./components/Header"
-import Footer from "./components/Footer"
+import "@/styles/globals.css"
+import { defaultColorScheme } from "@/styles/defaultColorScheme"
+import { StartDsfr } from "@/components/StartDsfr"
+import Header from "@/components/Header"
+import Footer from "@/components/Footer"
export const metadata: Metadata = {
- title: "Create Next App",
- description: "Generated by create next app",
+ title: "La Fabrique des Ministères Sociaux",
+ description:
+ "La fabrique numérique des ministères sociaux reprend la démarche et les grands principes de beta.gouv, à savoir : Un leitmotiv : la résolution d'irritants...",
}
export default function RootLayout({
@@ -22,6 +22,7 @@ export default function RootLayout({
children: React.ReactNode
}) {
const lang = "fr"
+
return (
@@ -45,7 +46,12 @@ export default function RootLayout({
- {children}
+
+ {children}
+
diff --git a/src/app/page.tsx b/src/app/page.tsx
index b234cb1ff..b11a5ee35 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -2,13 +2,12 @@ import { fr } from "@codegouvfr/react-dsfr"
export default function Home() {
return (
-
-
- Santé, Solidarité, Travail: nos startups à votre service
+ <>
+
+
+ Santé, Solidarité, Travail: nos startups à votre service
+
-
+ >
)
}
diff --git a/src/app/proposez-vous-idees/page.tsx b/src/app/proposez-vous-idees/page.tsx
new file mode 100644
index 000000000..83a8d0d40
--- /dev/null
+++ b/src/app/proposez-vous-idees/page.tsx
@@ -0,0 +1,9 @@
+import { fr } from "@codegouvfr/react-dsfr"
+
+export default function ProposezVosIdees() {
+ return (
+
+ )
+}
diff --git a/src/app/recrutement/page.tsx b/src/app/recrutement/page.tsx
new file mode 100644
index 000000000..0e78070d4
--- /dev/null
+++ b/src/app/recrutement/page.tsx
@@ -0,0 +1,9 @@
+import { fr } from "@codegouvfr/react-dsfr"
+
+export default function Recrutement() {
+ return (
+
+ )
+}
diff --git a/src/app/startups/page.tsx b/src/app/startups/page.tsx
new file mode 100644
index 000000000..6b5f7e08d
--- /dev/null
+++ b/src/app/startups/page.tsx
@@ -0,0 +1,9 @@
+import { fr } from "@codegouvfr/react-dsfr"
+
+export default function Startups() {
+ return (
+
+ )
+}
diff --git a/src/app/components/Footer.tsx b/src/components/Footer.tsx
similarity index 85%
rename from src/app/components/Footer.tsx
rename to src/components/Footer.tsx
index e58503e15..623f8c43c 100644
--- a/src/app/components/Footer.tsx
+++ b/src/components/Footer.tsx
@@ -3,13 +3,17 @@ import {
type FooterProps,
} from "@codegouvfr/react-dsfr/Footer"
-import { items as navigationItems } from "./Navigation"
+import { navigationItems } from "@/utils/navigationItems"
+import { quickAccessItems } from "@/utils/quickAccessItems"
const otherLinks: FooterProps.LinkList.Column = {
categoryName: "Autres",
- links: navigationItems.filter(
- (item) => !item.menuLinks
- ) as FooterProps.LinkList.Links,
+ links: [
+ ...(navigationItems.filter(
+ (item) => !item.menuLinks
+ ) as FooterProps.LinkList.Links),
+ ...(quickAccessItems as unknown as FooterProps.LinkList.Link[]),
+ ].slice(0, 8) as FooterProps.LinkList.Links,
}
const navigationToFooterLinkList: FooterProps.LinkList.List = [
diff --git a/src/app/components/Header.tsx b/src/components/Header.tsx
similarity index 76%
rename from src/app/components/Header.tsx
rename to src/components/Header.tsx
index 6e4e2e4b2..9f1f321e2 100644
--- a/src/app/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -1,5 +1,6 @@
-import Navigation from "./Navigation"
import { Header as DSFRHeader } from "@codegouvfr/react-dsfr/Header"
+import { quickAccessItems } from "@/utils/quickAccessItems"
+import Navigation from "./Navigation"
export default function Header() {
return (
@@ -18,15 +19,7 @@ export default function Header() {
}}
id="fr-header-header-with-quick-access-items-nav-items-and-search-engine"
navigation={}
- quickAccessItems={[
- {
- iconId: "fr-icon-file-text-line",
- linkProps: {
- href: "/documentation",
- },
- text: "Documentation",
- },
- ]}
+ quickAccessItems={quickAccessItems}
serviceTagline="Un incubateur betagouv 🥸"
serviceTitle="La Fabrique des Ministères Sociaux"
/>
diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx
new file mode 100644
index 000000000..978655c01
--- /dev/null
+++ b/src/components/Navigation.tsx
@@ -0,0 +1,43 @@
+"use client"
+import { useMemo } from "react"
+import { usePathname, useSearchParams } from "next/navigation"
+import {
+ MainNavigation,
+ type MainNavigationProps,
+} from "@codegouvfr/react-dsfr/MainNavigation"
+import { navigationItems } from "@/utils/navigationItems"
+
+export default function Navigation() {
+ const pathname = usePathname()
+ const searchParams = useSearchParams().toString()
+
+ const activeNavigationItems = useMemo(() => {
+ const currentUrl = `${pathname}${searchParams ? `?${searchParams}` : ""}`
+ const activeNavigationItems = navigationItems.map(
+ (item: MainNavigationProps.Item) => {
+ if (item.menuLinks?.length) {
+ let isActive = false
+ const activeMenuLinks = item.menuLinks.map((menuLink) => {
+ const menuLinkIsActive =
+ currentUrl === (menuLink.linkProps.href as string)
+ if (menuLinkIsActive) isActive = true
+ return { ...menuLink, isActive: menuLinkIsActive }
+ })
+
+ return { ...item, isActive, menuLinks: activeMenuLinks }
+ }
+ if (!item.linkProps) return item
+ return {
+ ...item,
+ isActive: pathname.startsWith(item.linkProps.href as string),
+ }
+ }
+ )
+ return activeNavigationItems
+ }, [pathname, searchParams])
+
+ // Warning: Prop `id` did not match. Server: "main-navigation-:Rt6cq:-button-0" Client: "main-navigation-:R3kpj9:-button-0"
+ // https://github.com/vercel/next.js/issues/53110
+
+ return
+}
diff --git a/src/app/StartDsfr.tsx b/src/components/StartDsfr.tsx
similarity index 83%
rename from src/app/StartDsfr.tsx
rename to src/components/StartDsfr.tsx
index b077f2634..02cb0cb98 100644
--- a/src/app/StartDsfr.tsx
+++ b/src/components/StartDsfr.tsx
@@ -1,8 +1,8 @@
"use client"
-import { startReactDsfr } from "@codegouvfr/react-dsfr/next-appdir"
-import { defaultColorScheme } from "./defaultColorScheme"
import Link from "next/link"
+import { startReactDsfr } from "@codegouvfr/react-dsfr/next-appdir"
+import { defaultColorScheme } from "@/styles/defaultColorScheme"
declare module "@codegouvfr/react-dsfr/next-appdir" {
interface RegisterLink {
diff --git a/src/app/defaultColorScheme.ts b/src/styles/defaultColorScheme.ts
similarity index 100%
rename from src/app/defaultColorScheme.ts
rename to src/styles/defaultColorScheme.ts
diff --git a/src/app/globals.css b/src/styles/globals.css
similarity index 79%
rename from src/app/globals.css
rename to src/styles/globals.css
index e0936eda7..fd81e8858 100644
--- a/src/app/globals.css
+++ b/src/styles/globals.css
@@ -18,6 +18,10 @@
body {
color: rgb(var(--foreground-rgb));
- background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb)))
+ background: linear-gradient(
+ to bottom,
+ transparent,
+ rgb(var(--background-end-rgb))
+ )
rgb(var(--background-start-rgb));
}
diff --git a/src/app/components/Navigation.tsx b/src/utils/navigationItems.ts
similarity index 64%
rename from src/app/components/Navigation.tsx
rename to src/utils/navigationItems.ts
index bf5f566a9..9730539ef 100644
--- a/src/app/components/Navigation.tsx
+++ b/src/utils/navigationItems.ts
@@ -1,35 +1,33 @@
-import {
- MainNavigation,
- type MainNavigationProps,
-} from "@codegouvfr/react-dsfr/MainNavigation"
+import { type MainNavigationProps } from "@codegouvfr/react-dsfr/MainNavigation"
+import { type HeaderProps } from "@codegouvfr/react-dsfr/Header"
-export const items: MainNavigationProps.Item[] = [
+const navigationItems: MainNavigationProps.Item[] = [
{
menuLinks: [
{
linkProps: {
- href: "#",
+ href: "/startups?categorie=travail",
target: "_self",
},
text: "Travail",
},
{
linkProps: {
- href: "#",
+ href: "/startups?categorie=solidarites",
target: "_self",
},
text: "Solidarités",
},
{
linkProps: {
- href: "#",
+ href: "/startups?categorie=sante",
target: "_self",
},
text: "Santé",
},
{
linkProps: {
- href: "#",
+ href: "/startups",
target: "_self",
},
text: "Tout voir",
@@ -41,21 +39,21 @@ export const items: MainNavigationProps.Item[] = [
menuLinks: [
{
linkProps: {
- href: "#",
+ href: "/a-propos",
target: "_self",
},
text: "À propos",
},
{
linkProps: {
- href: "#",
+ href: "/notre-offre",
target: "_self",
},
text: "Notre offre",
},
{
linkProps: {
- href: "#",
+ href: "/equipe",
target: "_self",
},
text: "L'équipe",
@@ -65,20 +63,18 @@ export const items: MainNavigationProps.Item[] = [
},
{
linkProps: {
- href: "#",
+ href: "/proposez-vous-idees",
target: "_self",
},
text: "Proposez vos idées",
},
{
linkProps: {
- href: "#",
+ href: "/recrutement",
target: "_self",
},
text: "Recrutement",
},
]
-export default function Navigation() {
- return
-}
+export { navigationItems }
diff --git a/src/utils/quickAccessItems.ts b/src/utils/quickAccessItems.ts
new file mode 100644
index 000000000..8468893f6
--- /dev/null
+++ b/src/utils/quickAccessItems.ts
@@ -0,0 +1,13 @@
+import { type HeaderProps } from "@codegouvfr/react-dsfr/Header"
+
+const quickAccessItems: HeaderProps.QuickAccessItem[] = [
+ {
+ iconId: "fr-icon-file-text-line",
+ linkProps: {
+ href: "/documentation",
+ },
+ text: "Documentation",
+ },
+]
+
+export { quickAccessItems }
diff --git a/tailwind.config.js b/tailwind.config.js
index d53b2eaa0..751ee12ad 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,16 +1,16 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
- './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
- './src/components/**/*.{js,ts,jsx,tsx,mdx}',
- './src/app/**/*.{js,ts,jsx,tsx,mdx}',
+ "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {
backgroundImage: {
- 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
- 'gradient-conic':
- 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
+ "gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
+ "gradient-conic":
+ "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
},
},
},