-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing
29 changed files
with
575 additions
and
257 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 |
---|---|---|
|
@@ -72,3 +72,5 @@ npm/react/dist/index.js.LICENSE.txt | |
dist/ | ||
|
||
public/webcomponents/ | ||
|
||
public/pdf/ |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { notFound } from 'next/navigation' | ||
import React from 'react' | ||
import { categories } from 'data/categories' | ||
import Recto from 'components/outils/equivalents/pdf/Recto' | ||
import 'components/outils/equivalents/pdf/pdf.css' | ||
|
||
const EquivalentPage = ({ params }: { params: { tool: string; equivalent: string } }) => { | ||
const category = categories.find((category) => category.slug === params.tool) | ||
if (!category || !category.equivalents) { | ||
return notFound() | ||
} | ||
const [slug] = decodeURIComponent(params.equivalent).split('+') | ||
const equivalent = category.equivalents.find((equivalent) => equivalent.slug === slug) | ||
if (!equivalent) { | ||
return notFound() | ||
} | ||
return <Recto equivalent={equivalent} /> | ||
} | ||
|
||
export default EquivalentPage |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { notFound } from 'next/navigation' | ||
import React from 'react' | ||
import { ParamProvider } from 'src/providers/ParamProvider' | ||
import TranslationProvider from 'src/providers/TranslationProvider' | ||
import { categories } from 'data/categories' | ||
import Verso from 'components/outils/equivalents/pdf/Verso' | ||
import 'components/outils/equivalents/pdf/pdf.css' | ||
|
||
const EquivalentPage = ({ params }: { params: { tool: string; equivalent: string } }) => { | ||
const category = categories.find((category) => category.slug === params.tool) | ||
if (!category || !category.equivalents) { | ||
return notFound() | ||
} | ||
const [slug] = decodeURIComponent(params.equivalent).split('+') | ||
const equivalent = category.equivalents.find((equivalent) => equivalent.slug === slug) | ||
if (!equivalent) { | ||
return notFound() | ||
} | ||
return ( | ||
<ParamProvider> | ||
<TranslationProvider> | ||
<Verso equivalent={equivalent} category={category} /> | ||
</TranslationProvider> | ||
</ParamProvider> | ||
) | ||
} | ||
|
||
export default EquivalentPage |
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,4 +1,3 @@ | ||
version: '3' | ||
services: | ||
db: | ||
image: postgres:16 | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,3 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
<sitemap><loc>http://localhost:3000/sitemap-0.xml</loc></sitemap> | ||
</sitemapindex> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-between; | ||
height: 1170px; | ||
width: 827px; | ||
padding: 128px 32px 64px 32px; | ||
} | ||
|
||
.image { | ||
width: 50%; | ||
|
||
img { | ||
height: auto; | ||
width: 100%; | ||
} | ||
} | ||
|
||
.content { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 100%; | ||
} | ||
|
||
.value { | ||
margin: 70px 0 20px 0; | ||
font-size: 130px; | ||
line-height: 130px; | ||
color: var(--neutral-80); | ||
font-weight: 800; | ||
} | ||
|
||
.text { | ||
text-align: center; | ||
color: var(--neutral-80); | ||
font-weight: 500; | ||
font-size: 40px; | ||
line-height: 40px; | ||
max-width: 75%; | ||
} | ||
|
||
.logos { | ||
display: flex; | ||
gap: 24px; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
svg { | ||
height: 40px; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react' | ||
import { ComputedEquivalent } from 'types/equivalent' | ||
import { getName } from 'utils/Equivalent/equivalent' | ||
import EquivalentIcon from 'components/base/EquivalentIcon' | ||
import Ademe from 'components/base/Logo/Ademe' | ||
import Logo from 'components/base/Logo/ImpactCO2' | ||
import Marianne from 'components/base/Logo/Marianne' | ||
import styles from './Recto.module.css' | ||
|
||
const Recto = ({ equivalent }: { equivalent: ComputedEquivalent }) => { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.content}> | ||
<div className={styles.image}> | ||
<EquivalentIcon equivalent={equivalent} /> | ||
</div> | ||
<div className={styles.value}>1</div> | ||
<div className={styles.text}>{getName('fr', equivalent, true, 1)}</div> | ||
</div> | ||
<div className={styles.logos}> | ||
<Marianne /> | ||
<Ademe /> | ||
<Logo /> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Recto |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-between; | ||
height: 1170px; | ||
width: 827px; | ||
padding: 64px; | ||
} | ||
|
||
.image { | ||
width: 50%; | ||
|
||
img { | ||
height: auto; | ||
width: 100%; | ||
} | ||
} | ||
|
||
.content { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 100%; | ||
} | ||
|
||
.header { | ||
width: 100%; | ||
|
||
img { | ||
width: 130px; | ||
height: auto; | ||
} | ||
} | ||
|
||
.table { | ||
margin-top: 16px; | ||
width: 100%; | ||
|
||
td { | ||
padding: 0.5rem 0; | ||
} | ||
} | ||
|
||
.simulator { | ||
margin: -1.25rem; | ||
} | ||
|
||
.logos { | ||
display: flex; | ||
gap: 24px; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
svg { | ||
height: 40px; | ||
} | ||
} | ||
|
||
.footer { | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
|
||
canvas { | ||
height: 135px !important; | ||
width: 135px !important; | ||
} | ||
} |
Oops, something went wrong.