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

[blog] Add fixes and clean ups to the Blog page #42311

Merged
merged 6 commits into from
May 23, 2024
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
1 change: 0 additions & 1 deletion docs/lib/sourcing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const ALLOWED_TAGS = [
'Pigment CSS',
'Joy UI',
'MUI X',
'MUI System',
'Toolpad',
];

Expand Down
49 changes: 24 additions & 25 deletions docs/pages/blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,28 @@ function PostPreview(props: BlogPost) {
</Typography>
{props.authors && (
<AvatarGroup
sx={[
(theme) => ({
mt: 2,
mb: 1,
alignSelf: 'flex-start',
sx={(theme) => ({
mt: 2,
mb: 1,
alignSelf: 'flex-start',
'& .MuiAvatar-circular': {
width: 28,
height: 28,
fontSize: theme.typography.pxToRem(13),
fontWeight: theme.typography.fontWeightSemiBold,
color: (theme.vars || theme).palette.text.primary,
border: `1px solid ${(theme.vars || theme).palette.divider}`,
outline: '3px solid',
outlineColor: '#FFF',
backgroundColor: (theme.vars || theme).palette.grey[100],
},
...theme.applyDarkStyles({
'& .MuiAvatar-circular': {
width: 28,
height: 28,
border: `1px solid ${(theme.vars || theme).palette.divider}`,
outline: '3px solid',
outlineColor: '#FFF',
backgroundColor: (theme.vars || theme).palette.grey[100],
outlineColor: (theme.vars || theme).palette.primaryDark[900],
backgroundColor: (theme.vars || theme).palette.primaryDark[700],
},
}),
(theme) =>
theme.applyDarkStyles({
'& .MuiAvatar-circular': {
outlineColor: (theme.vars || theme).palette.primaryDark[900],
backgroundColor: (theme.vars || theme).palette.primaryDark[700],
},
}),
]}
})}
>
{(props.authors as Array<keyof typeof AUTHORS>).map((author) => (
<Avatar
Expand Down Expand Up @@ -347,6 +347,7 @@ export default function Blog(props: InferGetStaticPropsType<typeof getStaticProp
>
<Paper variant="outlined">
<Typography
component="h3"
color="text.primary"
fontWeight="semiBold"
variant="subtitle2"
Expand Down Expand Up @@ -387,16 +388,14 @@ export default function Blog(props: InferGetStaticPropsType<typeof getStaticProp
},
})}
size="small"
sx={{
py: 1.2,
}}
/>
);
})}
</Box>
</Paper>
<Paper variant="outlined">
<Typography
component="h3"
color="text.primary"
fontWeight="semiBold"
variant="subtitle2"
Expand Down Expand Up @@ -437,7 +436,7 @@ export default function Blog(props: InferGetStaticPropsType<typeof getStaticProp
<Box
component="li"
key={post.slug}
sx={() => ({
sx={{
py: 2.5,
display: 'flex',
flexDirection: 'column',
Expand All @@ -446,7 +445,7 @@ export default function Blog(props: InferGetStaticPropsType<typeof getStaticProp
borderBottom: '1px solid',
borderColor: 'divider',
},
})}
}}
>
<PostPreview {...post} />
</Box>
Expand All @@ -461,7 +460,7 @@ export default function Blog(props: InferGetStaticPropsType<typeof getStaticProp
setPage(value - 1);
postListRef.current?.scrollIntoView();
}}
sx={{ mt: 1, mb: 8 }}
sx={{ mt: 1, mb: 4 }}
/>
</div>
</Container>
Expand Down