diff --git a/app/outils/page.tsx b/app/outils/page.tsx new file mode 100644 index 000000000..afc80e9aa --- /dev/null +++ b/app/outils/page.tsx @@ -0,0 +1,14 @@ +import React from 'react' +import Outils from 'components/outils/Outils' +import Suggestion from 'components/layout/web/Suggestion' + +const OutilsPage = async () => { + return ( + <> + + + + ) +} + +export default OutilsPage diff --git a/public/images/tools-boisson.svg b/public/images/tools-boisson.svg new file mode 100644 index 000000000..4d650e18a --- /dev/null +++ b/public/images/tools-boisson.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools-electromenager.svg b/public/images/tools-electromenager.svg new file mode 100644 index 000000000..3b8eea70d --- /dev/null +++ b/public/images/tools-electromenager.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools-fruitsetlegumes.svg b/public/images/tools-fruitsetlegumes.svg new file mode 100644 index 000000000..b522e376c --- /dev/null +++ b/public/images/tools-fruitsetlegumes.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools-habillement.svg b/public/images/tools-habillement.svg new file mode 100644 index 000000000..598270911 --- /dev/null +++ b/public/images/tools-habillement.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools-livraison.svg b/public/images/tools-livraison.svg new file mode 100644 index 000000000..c9b3eae17 --- /dev/null +++ b/public/images/tools-livraison.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools-mobilier.svg b/public/images/tools-mobilier.svg new file mode 100644 index 000000000..c0a3a1509 --- /dev/null +++ b/public/images/tools-mobilier.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools-numerique.svg b/public/images/tools-numerique.svg new file mode 100644 index 000000000..8ce65357c --- /dev/null +++ b/public/images/tools-numerique.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools-repas.svg b/public/images/tools-repas.svg new file mode 100644 index 000000000..c19ef97a8 --- /dev/null +++ b/public/images/tools-repas.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools-transports.svg b/public/images/tools-transport.svg similarity index 100% rename from public/images/tools-transports.svg rename to public/images/tools-transport.svg diff --git a/public/images/tools-usagenumerique.svg b/public/images/tools-usagenumerique.svg new file mode 100644 index 000000000..9ce19ce72 --- /dev/null +++ b/public/images/tools-usagenumerique.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/tools.zip b/public/images/tools.zip new file mode 100644 index 000000000..29f620f0a Binary files /dev/null and b/public/images/tools.zip differ diff --git a/src/components/breadcrumbs/Breadcrumbs.module.css b/src/components/breadcrumbs/Breadcrumbs.module.css new file mode 100644 index 000000000..ddbe01088 --- /dev/null +++ b/src/components/breadcrumbs/Breadcrumbs.module.css @@ -0,0 +1,18 @@ +.container { + border-radius: 0px 0px 16px 16px; + background: var(--neutral-10); + display: flex; + justify-content: center; + align-items: center; + gap: 0.5rem; + padding: 1rem 0.75rem; + + svg { + color: var(--neutral-40); + } +} + +.current { + color: var(--neutral-60); + font-weight: 500; +} diff --git a/src/components/breadcrumbs/Breadcrumbs.tsx b/src/components/breadcrumbs/Breadcrumbs.tsx new file mode 100644 index 000000000..fa8eb2fa0 --- /dev/null +++ b/src/components/breadcrumbs/Breadcrumbs.tsx @@ -0,0 +1,22 @@ +import React from 'react' +import Link from 'components/base/buttons/Link' +import { Icon } from 'components/osezchanger/icons' +import styles from './Breadcrumbs.module.css' + +const Breadcrumbs = ({ links, current }: { links: { label: string; link: string }[]; current: string }) => { + return ( +
+
+ {links.map(({ label, link }) => ( + <> + {label} + + + ))} +
{current}
+
+
+ ) +} + +export default Breadcrumbs diff --git a/src/components/cards/ToolCard.module.css b/src/components/cards/ToolCard.module.css index d0e7bc656..a4103b3e3 100644 --- a/src/components/cards/ToolCard.module.css +++ b/src/components/cards/ToolCard.module.css @@ -4,6 +4,7 @@ } .card { + width: calc(100% / 3 - 0.5rem); display: flex; text-decoration: none; cursor: pointer; diff --git a/src/components/cards/ToolCard.stories.tsx b/src/components/cards/ToolCard.stories.tsx index 4f758dd26..4a475872b 100644 --- a/src/components/cards/ToolCard.stories.tsx +++ b/src/components/cards/ToolCard.stories.tsx @@ -10,10 +10,9 @@ type Story = StoryObj export const Basique: Story = { args: { - image: '/images/tools-comparateur.svg', title: 'Comparateur', + slug: 'comparateur', description: 'Le bon outil pour obtenir les bons ordres de grandeur', - link: '/comparateur', linkLabel: 'Visualiser', }, } @@ -21,10 +20,9 @@ export const Basique: Story = { export const Horizontal: Story = { args: { horizontal: true, - image: '/images/tools-comparateur.svg', title: 'Comparateur', + slug: 'comparateur', description: 'Le bon outil pour obtenir les bons ordres de grandeur', - link: '/comparateur', linkLabel: 'Visualiser', }, } diff --git a/src/components/cards/ToolCard.tsx b/src/components/cards/ToolCard.tsx index 48371d08d..365434d17 100644 --- a/src/components/cards/ToolCard.tsx +++ b/src/components/cards/ToolCard.tsx @@ -5,27 +5,25 @@ import { Icon } from 'components/osezchanger/icons' import styles from './ToolCard.module.css' const ToolCard = ({ - image, + slug, title, description, - link, linkLabel, horizontal, }: { - image: string + slug: string title: string description: string - link: string linkLabel: string horizontal?: boolean }) => { return ( - +
{title}
diff --git a/src/components/cards/ToolCards.module.css b/src/components/cards/ToolCards.module.css index 2e4858c34..05d3fee26 100644 --- a/src/components/cards/ToolCards.module.css +++ b/src/components/cards/ToolCards.module.css @@ -1,8 +1,5 @@ .container { display: flex; + flex-wrap: wrap; gap: 0.75rem; - - @media screen and (max-width: 48rem) { - flex-wrap: wrap; - } } diff --git a/src/components/cards/tools.ts b/src/components/cards/tools.ts new file mode 100644 index 000000000..8915fd3c7 --- /dev/null +++ b/src/components/cards/tools.ts @@ -0,0 +1,75 @@ +export const tools = [ + { + slug: 'comparateur', + title: 'Comparateur', + description: 'Le bon outil pour obtenir les bons ordres de grandeur', + linkLabel: 'Visualiser', + }, + { + slug: 'transport', + title: 'Transports', + description: 'Calculer l’impact carbone des moyens de transport', + linkLabel: 'Essayer', + }, + { + slug: 'chauffage', + title: 'Chauffage', + description: 'Situer l’empreinte carbone des modes de chauffage', + linkLabel: 'Calculer', + }, + { + slug: 'mobilier', + title: 'Mobilier', + description: 'Découvrir l’impact carbone des meubles', + linkLabel: 'Visualiser', + }, + { + slug: 'repas', + title: 'Repas', + description: 'Pour aborder l’impact carbone de l’alimentation', + linkLabel: 'Découvrir', + }, + { + slug: 'electromenager', + title: 'Électroménager', + description: 'Comparer l’impact carbone des appareils ménagers', + linkLabel: 'Comparer', + }, + { + slug: 'fruitsetlegumes', + title: 'Fruits et légumes', + description: 'Aliquam eu libero malesuada, consequat odio ', + linkLabel: 'Visualiser', + }, + { + slug: 'habillement', + title: 'Habillement', + description: 'Aliquam eu libero malesuada, consequat odio ', + linkLabel: 'Découvrir', + }, + { + slug: 'numerique', + title: 'Numérique', + description: 'Aliquam eu libero malesuada, consequat odio ', + linkLabel: 'Comparer', + }, + { + slug: 'boisson', + title: 'Boissons', + description: 'Aliquam eu libero malesuada, consequat odio ', + linkLabel: 'Comparer', + }, + { + slug: 'usagenumerique', + title: 'Usage numérique', + description: 'Aliquam eu libero malesuada, consequat odio ', + linkLabel: 'Visualiser', + }, + + { + slug: 'livraison', + title: 'Livraison', + description: 'Aliquam eu libero malesuada, consequat odio ', + linkLabel: 'Découvrir', + }, +] diff --git a/src/components/home/Home.tsx b/src/components/home/Home.tsx index fea4ecbc6..7f08356aa 100644 --- a/src/components/home/Home.tsx +++ b/src/components/home/Home.tsx @@ -2,6 +2,7 @@ import React from 'react' import Link from 'components/base/buttons/Link' import ToolCard from 'components/cards/ToolCard' import ToolCards from 'components/cards/ToolCards' +import { tools } from 'components/cards/tools' import Block from 'components/layout/web/Block' import Email from './Email' import Equivalents from './Equivalents' @@ -14,27 +15,9 @@ const Home = () => {

Les bons outils pour communiquer sur l’impact carbone

- - - + {tools.slice(0, 3).map((tool) => ( + + ))}
Voir tous les outils @@ -71,10 +54,9 @@ const Home = () => { description="Vous souhaitez mobiliser votre communauté autour de l'empreinte carbone ?"> diff --git a/src/components/layout/web/Block.module.css b/src/components/layout/web/Block.module.css index 9add36658..0b8d2dba1 100644 --- a/src/components/layout/web/Block.module.css +++ b/src/components/layout/web/Block.module.css @@ -1,11 +1,6 @@ .block { margin: auto; padding-top: 4rem; - padding-bottom: 2rem; - - h2 { - margin-bottom: 0; - } } .description { @@ -18,7 +13,6 @@ display: flex; justify-content: space-between; align-items: flex-end; - margin-bottom: 2rem; gap: 0.75rem; @media screen and (max-width: 48rem) { @@ -26,3 +20,8 @@ flex-direction: column; } } + +.children { + margin-top: 2rem; + padding-bottom: 2rem; +} diff --git a/src/components/layout/web/Block.tsx b/src/components/layout/web/Block.tsx index d4003fa7f..750b20758 100644 --- a/src/components/layout/web/Block.tsx +++ b/src/components/layout/web/Block.tsx @@ -3,31 +3,43 @@ import React, { ReactNode } from 'react' import Link from 'components/base/buttons/Link' import styles from './Block.module.css' +const getTitle = (title?: string, as?: 'h1') => { + if (!title) { + return null + } + if (as === 'h1') { + return

{title}

+ } + return

{title}

+} + const Block = ({ children, title, description, link, linkLabel, + as, }: { - children: ReactNode + children?: ReactNode title?: string description?: string link?: string linkLabel?: string + as?: 'h1' }) => { return (
{title && (
- {title &&

{title}

} + {getTitle(title, as)} {description &&
{description}
}
{link && {linkLabel}}
)} - {children} + {children &&
{children}
}
) } diff --git a/src/components/osezchanger/icons/arrow-right.tsx b/src/components/osezchanger/icons/arrow-right.tsx index 32c232174..99cc2ec03 100644 --- a/src/components/osezchanger/icons/arrow-right.tsx +++ b/src/components/osezchanger/icons/arrow-right.tsx @@ -1,11 +1,11 @@ import React from 'react' const Icon = () => ( - + diff --git a/src/components/outils/Outils.tsx b/src/components/outils/Outils.tsx new file mode 100644 index 000000000..e12e8d6a0 --- /dev/null +++ b/src/components/outils/Outils.tsx @@ -0,0 +1,78 @@ +import React from 'react' +import Breadcrumbs from 'components/breadcrumbs/Breadcrumbs' +import ToolCard from 'components/cards/ToolCard' +import ToolCards from 'components/cards/ToolCards' +import { tools } from 'components/cards/tools' +import Equivalents from 'components/home/Equivalents' +import Block from 'components/layout/web/Block' + +const Outils = () => { + return ( + <> + + + + + {tools.map((tool) => ( + + ))} + + + + + + + + + + + + + + + + + + + + + ) +} + +export default Outils diff --git a/src/utils/styles.css b/src/utils/styles.css index 3d8bd366d..1500385d7 100644 --- a/src/utils/styles.css +++ b/src/utils/styles.css @@ -270,15 +270,20 @@ h1 { color: var(--neutral-100); font-size: 2.5rem; line-height: 3.25rem; - margin-bottom: 1.5rem; + font-weight: 800; + + @media screen and (max-width: 29.875rem) { + font-size: 2rem; + line-height: 2.75rem; + } } .title-h2, h2 { + font-weight: 700; color: var(--neutral-80); font-size: 2rem; line-height: 2.75rem; - margin-bottom: 1.25rem; } .title-h3,