Skip to content

Commit

Permalink
Style dashboard header on mobile (#3411)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliawegmayr authored Feb 25, 2025
1 parent 908ddda commit 46ab330
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-trains-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-admin": patch
---

Adapt styling of the dashboard header to match the Comet DXP design
24 changes: 18 additions & 6 deletions packages/admin/cms-admin/src/dashboard/DashboardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type RootProps = {

const Root = styled("div")<RootProps>`
position: relative;
height: 300px;
height: 230px;
color: ${({ textColor }) => (textColor === "light" ? "white" : textColor === "dark" ? "black" : "inherit")};
background-color: ${({ theme }) => theme.palette.grey[700]};
Expand All @@ -45,13 +45,25 @@ const Root = styled("div")<RootProps>`
background-image: url(${backgroundImageUrl["2x"]});
}
`}
${({ theme }) => theme.breakpoints.up("sm")} {
height: 300px;
}
`;

const Greeting = styled(Typography)`
position: absolute;
left: ${({ theme }) => theme.spacing(8)};
bottom: ${({ theme }) => theme.spacing(8)};
font-size: 55px;
line-height: 64px;
font-weight: 200;
left: ${({ theme }) => theme.spacing(4)};
bottom: 12px;
font-size: 30px;
line-height: 38px;
font-weight: 160;
${({ theme }) => theme.breakpoints.up("sm")} {
left: ${({ theme }) => theme.spacing(8)};
bottom: ${({ theme }) => theme.spacing(8)};
font-size: 55px;
line-height: 64px;
font-weight: 200;
}
`;
30 changes: 23 additions & 7 deletions packages/admin/cms-admin/src/dashboard/DateTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,34 @@ export const DateTime = () => {

const Root = styled("div")`
position: absolute;
top: ${({ theme }) => theme.spacing(4)};
right: ${({ theme }) => theme.spacing(8)};
font-weight: 200;
top: 16px;
right: ${({ theme }) => theme.spacing(4)};
text-align: right;
${({ theme }) => theme.breakpoints.up("sm")} {
top: ${({ theme }) => theme.spacing(4)};
right: ${({ theme }) => theme.spacing(8)};
}
`;

const DateContainer = styled("div")`
font-size: 33px;
line-height: 39px;
font-size: 24px;
line-height: 28px;
font-weight: 150;
${({ theme }) => theme.breakpoints.up("sm")} {
font-size: 33px;
line-height: 39px;
}
`;

const TimeContainer = styled("div")`
font-size: 55px;
line-height: 64px;
font-size: 36px;
line-height: 42px;
font-weight: 170;
${({ theme }) => theme.breakpoints.up("sm")} {
font-size: 55px;
line-height: 64px;
}
`;

0 comments on commit 46ab330

Please sign in to comment.