Skip to content

Commit

Permalink
feat: add terms, disclaimer and privacy policy pages (#456)
Browse files Browse the repository at this point in the history
* feat: add terms page

* fix: add disclaimer

* fix: add privacy policy

* fix: styling

* fix: improve belearn icon

* fix: review comments
  • Loading branch information
spaenleh authored Nov 19, 2024
1 parent 8f617e0 commit 19f81cc
Show file tree
Hide file tree
Showing 17 changed files with 1,016 additions and 195 deletions.
198 changes: 198 additions & 0 deletions public/locales/en/landing.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ export const NS = {
Common: 'common',
Enums: 'enums',
} as const;

export const PRIVACY_EMAIL = '[email protected]';
12 changes: 11 additions & 1 deletion src/modules/landing/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,17 @@ const socialLinks = [
},
];

const internalLinkActiveProp = () => ({ sx: { textDecoration: 'underline' } });
const internalLinkActiveProp = () => ({
sx: {
backgroundColor: '#00000040',
'&::before': {
content: `url("data:image/svg+xml,${encodeURI('<svg xmlns="http://www.w3.org/2000/svg" color="white" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-map-pin"><path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"/><circle cx="12" cy="10" r="3"/></svg>')}")`,
position: 'relative',
top: '2px',
marginRight: '8px',
},
},
});

export function Footer(): JSX.Element {
const { t } = useTranslation(NS.Landing);
Expand Down
18 changes: 1 addition & 17 deletions src/modules/landing/home/icons/BeLEARN.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,7 @@ export function BeLEARN({
<title>BeLEARN</title>
<defs>
<style>
{`
.cls-1 {
fill: none;
}
.cls-2 {
clip-path: url(#clippath-1);
}
.cls-3 {
clip-path: url(#clippath-2);
}
.cls-4 {
clip-path: url(#clippath);
}
`}
{`.cls-1 {fill: none;}.cls-2 {clip-path: url(#clippath-1);}.cls-3 {clip-path: url(#clippath-2);}.cls-4 {clip-path: url(#clippath);}`}
</style>
<clipPath id="clippath">
<path
Expand Down
112 changes: 112 additions & 0 deletions src/modules/landing/privacyPolicy/layouts.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import { ReactNode } from 'react';

import { Stack, Typography } from '@mui/material';

export function Section({
children,
title,
}: {
children: ReactNode;
title: ReactNode;
}): JSX.Element {
return (
<Stack gap={2}>
<SectionTitle>{title}</SectionTitle>
<Stack component="ol" sx={{ paddingInlineStart: 0 }} gap={4}>
{children}
</Stack>
</Stack>
);
}

export function SectionTitle({
children,
}: {
children: ReactNode;
}): JSX.Element {
return (
<Typography component="li" variant="h2" color="primary">
{children}
</Typography>
);
}

export function ListItem({ children }: { children: ReactNode }): JSX.Element {
return <Typography component="li">{children}</Typography>;
}
export function Paragraphs({ children }: { children: ReactNode }): JSX.Element {
return (
<Stack direction="column" gap={2}>
{children}
</Stack>
);
}

export function SubSection({
children,
title,
}: {
children: ReactNode;
title: string;
}): JSX.Element {
return (
<Paragraphs>
<Typography variant="h5" component="li">
{title}
</Typography>
{children}
</Paragraphs>
);
}

export function EnumeratedParagraph({
children,
text,
}: {
children: ReactNode;
text: ReactNode;
}): JSX.Element {
return (
<Stack gap={1}>
<Typography>{text}</Typography>
<Stack
component="ol"
gap={1}
sx={{
paddingInlineStart: '20px',
'& li': {
listPosition: 'outside',
},
}}
>
{children}
</Stack>
</Stack>
);
}

export function ListedParagraph({
children,
text,
}: {
children: ReactNode;
text?: ReactNode;
}): JSX.Element {
return (
<Stack gap={1}>
{text && <Typography>{text}</Typography>}
<Stack
component="ul"
sx={{
paddingInlineStart: '20px',
listStyleType: 'disc',
'& li': {
listPosition: 'outside',
},
}}
>
{children}
</Stack>
</Stack>
);
}
Loading

0 comments on commit 19f81cc

Please sign in to comment.