Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add config.marianne #79

Merged
merged 1 commit into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -34,6 +34,7 @@ type DashlordConfig = {
footer: string;
tools?: DashlordTool[] | Record<DashlordTool, boolean>;
urls: UrlConfig[];
marianne: boolean;
};

type LighthouseReportCategory = {
Expand Down