Skip to content

Commit

Permalink
feat: add config.marianne
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Sep 30, 2021
1 parent db77621 commit 1dd90fd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion report/www/src/components/FooterSite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import dashlordConfig from "../config.json";
export const FooterSite: React.FC = () => (
<Footer>
<FooterBody description="">
<Logo>{dashlordConfig.entity}</Logo>
{dashlordConfig.marianne === true ? (
<Logo>{dashlordConfig.entity}</Logo>
) : null}
<FooterBodyItem>
<div>{dashlordConfig.footer}</div>
</FooterBodyItem>
Expand Down
5 changes: 3 additions & 2 deletions report/www/src/components/HeaderSite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ export const HeaderSite: React.FC<HeaderSiteProps> = ({ report }) => {
sortedReport.filter((u) => u.category).map((u) => u.category)
).sort() as string[];

console.log(location.pathname);
return (
<>
<Header>
<HeaderBody>
<Logo splitCharacter={10}>{dashlordConfig.entity}</Logo>
{dashlordConfig.marianne === true ? (
<Logo splitCharacter={10}>{dashlordConfig.entity}</Logo>
) : null}
<Service
asLink={<RouterLink to="/#" />}
title={dashlordConfig.title}
Expand Down
1 change: 1 addition & 0 deletions report/www/src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "Bonnes pratiques techniques",
"entity": "Ministères sociaux",
"footer": "Propulsé par SocialGouv",
"marianne": true,
"tools": {
"404": true,
"screenshot": true,
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type DashlordConfig = {
footer: string;
tools?: DashlordTool[] | Record<DashlordTool, boolean>;
urls: UrlConfig[];
marianne: boolean;
};

type LighthouseReportCategory = {
Expand Down

0 comments on commit 1dd90fd

Please sign in to comment.