style(dashboard): make home page container responsive padding

Adjust AppShell padding to responsive values and add a CSS module that
handles container top and side padding for different breakpoints,
replacing the previous fixed `pt="xl"` usage.
This commit is contained in:
claude_code
2026-06-22 03:27:40 +03:00
parent 2846830bf7
commit b60190ff1e
3 changed files with 16 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ export default function GlobalAppShell({
collapsed: { mobile: !isAsideOpen, desktop: !isAsideOpen },
}
}
padding="md"
padding={{ base: "xs", sm: "md" }}
>
<AppShell.Header px="md" className={classes.header}>
<AppHeader />

View File

@@ -0,0 +1,13 @@
.container {
/* Default top padding for tablet/desktop (replaces the former pt="xl") */
padding-top: var(--mantine-spacing-xl);
}
@media (max-width: $mantine-breakpoint-sm) {
.container {
/* On phones drop the extra side padding (AppShell already provides the
outer gap) and shrink the top gap below the header. */
padding-inline: 0;
padding-top: var(--mantine-spacing-xs);
}
}

View File

@@ -5,6 +5,7 @@ import SpaceCarousel from "@/features/space/components/space-carousel.tsx";
import { getAppName } from "@/lib/config.ts";
import { Helmet } from "react-helmet-async";
import { useTranslation } from "react-i18next";
import classes from "./home.module.css";
export default function Home() {
const { t } = useTranslation();
@@ -16,7 +17,7 @@ export default function Home() {
{t("Home")} - {getAppName()}
</title>
</Helmet>
<Container size={"900"} pt="xl">
<Container size={"900"} className={classes.container}>
<NewNoteButton />
<Space h="xl" />