Skip to content

Commit

Permalink
Merge pull request #28 from SocialGouv/feat-maj-stats
Browse files Browse the repository at this point in the history
Feat maj stats
  • Loading branch information
alebret authored Jul 12, 2022
2 parents c672b76 + f05aabb commit 16bd424
Show file tree
Hide file tree
Showing 6 changed files with 828 additions and 476 deletions.
1 change: 0 additions & 1 deletion config-yml/commons/footer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ bottomMenuList:

laFabrique: La Fabrique Numérique des Ministères Sociaux
republiqueFrancaise: République Française
licence: Sauf mention contraire, tous les textes de ce site sont sous
12 changes: 3 additions & 9 deletions config-yml/modules/stats.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
home:
display: true
title: Les stats
#Placer les icones dans le dossier public/assets/imgs/icons
kpis:
- title: tests EPDS passés, tout confondu
value: 374
icon_name: icone-EPDS.svg

- title: parents orientés, tout confondu
value: 258
icon_name: icone-parents.svg
content: Vous pouvez retrouver toutes nos statistiques sur la page suivante
url : https://1000jours.fabrique.social.gouv.fr/stats
urlLabel: Accéder aux statistiques

page:
title: Statistiques
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"devDependencies": {
"@socialgouv/eslint-config-react": "^1.61.0",
"eslint": "^8.0.0",
"jest": "^28.0.0",
"jest": "^27.5.1",
"prettier": "^2.2.1"
},
"eslintConfig": {
Expand All @@ -51,4 +51,4 @@
"@socialgouv/eslint-config-react"
]
}
}
}
3 changes: 1 addition & 2 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function Footer() {
<FooterBody description={footer.laFabrique}>
<Logo>{footer.republiqueFrancaise}</Logo>
{footer.liensGouv.map((item, index) => (
<FooterBodyItem KEY={index}>
<FooterBodyItem key={index}>
<Link href={item.url}>{item.name}</Link>
</FooterBodyItem>
))}
Expand All @@ -31,7 +31,6 @@ export function Footer() {
</FooterLink>
))}
<FooterCopy>
{footer.licence}{" "}
<a
href="https://github.com/etalab/licence-ouverte/blob/master/LO.md"
target="_blank"
Expand Down
29 changes: 12 additions & 17 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ import { Col, Container, Row } from "react-bootstrap";
import Slider from "react-slick";

import header from "../../config-yml/commons/header.yml";
import partners from "../../config-yml/modules/partners.yml";
import articles from "../../config-yml/modules/articles.yml";
import instagram from "../../config-yml/modules/instagram.yml";
import newsletter from "../../config-yml/modules/newsletter.yml";
import onboarding from "../../config-yml/modules/onboarding.yml";
import partners from "../../config-yml/modules/partners.yml";
import { home } from "../../config-yml/modules/stats.yml";
import { ArticleCard } from "../components/ArticleCard";
import { Header } from "../components/Header";
import InstagramPostList from "../components/InstagramPostList";
import { Layout } from "../components/Layout";
import Newsletter from "../components/Newsletter";
import { Onboarding } from "../components/Onboarding";
import { Stats } from "../components/Stats";

const stats = home;

Expand Down Expand Up @@ -69,21 +68,17 @@ function Statistic() {
<Col>
<h2 className="pb-lg-5">{stats.title}</h2>
</Col>
<Col
xs={0}
xl={{ offset: 1, span: 11 }}
className="d-flex justify-content-around w-100 align-items-center flex-wrap"
>
{stats.kpis.map((stat, index) => (
<Col xl={4} md={3} key={index} className="mb-4 mb-md-0">
<Stats
title={stat.title}
icon={stat.icon_name}
value={stat.value}
/>
</Col>
))}
</Col>
<p style={{ textAlign: "center" }}>
{stats.content} : <br />
<a
href={stats.url}
target="_blank"
rel="noreferrer"
className="blue-btn mt-2 btn btn-primary"
>
{stats.urlLabel}
</a>
</p>
</Row>
)
);
Expand Down
Loading

0 comments on commit 16bd424

Please sign in to comment.