Skip to content

Commit 1ad0126

Browse files
fix: layout consistency
1 parent 9e00096 commit 1ad0126

File tree

5 files changed

+203
-171
lines changed

5 files changed

+203
-171
lines changed

app/src/Router.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createBrowserRouter, Navigate, RouterProvider } from 'react-router-dom';
22
import Layout from './components/Layout';
33
import HomePage from './pages/Home.page';
4-
import LearnAiMlPage from './pages/Learn-ai-ml.page';
4+
import LearnAiMlPage from './pages/ML.page';
55
import PoliciesPage from './pages/Policies.page';
66
import PopulationsPage from './pages/Populations.page';
77
import ReportOutputPage from './pages/ReportOutput.page';

app/src/components/TwoColumnView.tsx

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Grid, Paper, Title } from '@mantine/core';
1+
import { Grid, Paper, Title, Box } from '@mantine/core';
22
import { colors, spacing, typography } from '@/designTokens';
33

44
interface TwoColumnViewProps {
@@ -22,26 +22,34 @@ const TwoColumnView = ({ title, leftColumn, rightColumn, backgroundColor }: TwoC
2222
return (
2323
<Paper
2424
bg={getBackgroundColor()}
25-
p={spacing.container.lg}
25+
p={spacing['3xl']}
2626
radius={spacing.radius.lg}
2727
style={{ minHeight: '400px' }}
2828
>
29-
<Title
30-
order={2}
31-
variant="colored"
32-
ff={typography.fontFamily.primary}
33-
size={typography.fontSize['3xl']}
34-
fw={typography.fontWeight.bold}
35-
c={colors.text.title}
36-
mb={spacing['3xl']}
37-
ta="left"
29+
<Box
30+
px={spacing.xl}
31+
style={{
32+
maxWidth: 1300,
33+
margin: '0 auto',
34+
}}
3835
>
39-
{title}
40-
</Title>
41-
<Grid gutter={spacing['3xl']} align="center">
42-
<Grid.Col span={{ base: 12, sm: 6 }}>{leftColumn}</Grid.Col>
43-
<Grid.Col span={{ base: 12, sm: 6 }}>{rightColumn}</Grid.Col>
44-
</Grid>
36+
<Title
37+
order={2}
38+
variant="colored"
39+
ff={typography.fontFamily.primary}
40+
size={typography.fontSize['3xl']}
41+
fw={typography.fontWeight.bold}
42+
c={colors.text.title}
43+
mb={spacing['3xl']}
44+
ta="left"
45+
>
46+
{title}
47+
</Title>
48+
<Grid gutter={spacing['3xl']} align="center">
49+
<Grid.Col span={{ base: 12, sm: 6 }}>{leftColumn}</Grid.Col>
50+
<Grid.Col span={{ base: 12, sm: 6 }}>{rightColumn}</Grid.Col>
51+
</Grid>
52+
</Box>
4553
</Paper>
4654
);
4755
};

app/src/components/shared/static/PageHeader.tsx

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,50 @@ export default function PageHeader({ title, description }: PageHeaderProps) {
1616
borderBottom: `1px solid ${colors.border.dark}`,
1717
}}
1818
>
19-
<Flex
20-
direction={{ base: 'column', md: 'row' }}
21-
align={{ base: 'stretch', md: 'center' }}
22-
gap={{ base: 'md', md: 'xl' }}
19+
<Box
20+
px={spacing.xl}
21+
style={{
22+
maxWidth: 1300,
23+
margin: '0 auto',
24+
}}
2325
>
24-
<Box w={{ base: '100%', md: 300 }}>
25-
<Title
26-
variant="colored"
27-
style={{
28-
fontSize: typography.fontSize['4xl'],
29-
fontWeight: typography.fontWeight.semibold,
30-
fontFamily: typography.fontFamily.primary,
31-
}}
32-
>
33-
{title}
34-
</Title>
35-
</Box>
26+
<Flex
27+
direction={{ base: 'column', md: 'row' }}
28+
align={{ base: 'stretch', md: 'center' }}
29+
gap={{ base: 'md', md: 'xl' }}
30+
>
31+
<Box w={{ base: '100%', md: 300 }}>
32+
<Title
33+
variant="colored"
34+
style={{
35+
fontSize: typography.fontSize['4xl'],
36+
fontWeight: typography.fontWeight.semibold,
37+
fontFamily: typography.fontFamily.primary,
38+
}}
39+
>
40+
{title}
41+
</Title>
42+
</Box>
3643

37-
<Divider orientation="horizontal" size="xs" color={colors.border.light} hiddenFrom="md" />
44+
<Divider orientation="horizontal" size="xs" color={colors.border.light} hiddenFrom="md" />
3845

39-
<Divider orientation="vertical" size="xs" color={colors.border.light} visibleFrom="md" />
46+
<Divider orientation="vertical" size="xs" color={colors.border.light} visibleFrom="md" />
4047

41-
<Box w={{ base: '100%', md: 'auto' }}>
42-
<Text
43-
style={{
44-
color: colors.text.primary,
45-
fontSize: typography.fontSize.lg,
46-
lineHeight: typography.lineHeight.relaxed,
47-
fontFamily: typography.fontFamily.body,
48-
}}
49-
ta={{ base: 'left', md: 'center' }}
50-
>
51-
{description}
52-
</Text>
53-
</Box>
54-
</Flex>
48+
<Box w={{ base: '100%', md: 'auto' }}>
49+
<Text
50+
style={{
51+
color: colors.text.primary,
52+
fontSize: typography.fontSize.lg,
53+
lineHeight: typography.lineHeight.relaxed,
54+
fontFamily: typography.fontFamily.body,
55+
}}
56+
ta={{ base: 'left', md: 'center' }}
57+
>
58+
{description}
59+
</Text>
60+
</Box>
61+
</Flex>
62+
</Box>
5563
</Box>
5664
);
5765
}

app/src/pages/Learn-ai-ml.page.tsx

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)