Skip to content

Commit

Permalink
index is responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoussand committed Feb 29, 2024
1 parent d797125 commit 3e4bb55
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { Stack, Container, Typography, Box } from "@mui/material";
import {
Stack,
Container,
Typography,
Box,
useMediaQuery,
} from "@mui/material";
import { useAtom } from "jotai";
import type { NextPage } from "next";
import Image from "next/image";
Expand All @@ -10,6 +16,7 @@ import AppLink from "src/components/ui/Buttons/AppLink";
import ObjectiveCard from "src/components/ui/Cards/ObjectiveCard/ObjectiveCard";
import PageTextTemplate from "src/components/ui/PageTextTemplate/PageTextTemplate";
import { cartAtom } from "src/store/cart";
import theme from "src/theming/theme";

import { StaticProps } from "./_app";

Expand All @@ -22,6 +29,7 @@ const Home: NextPage = () => {
}, [setCart]);

const emphasisStyle = { color: "primary.main", fontWeight: "bold" };
const isMobile = useMediaQuery(theme.breakpoints.down("sm"));

const presentationText = (
<Typography>
Expand Down Expand Up @@ -53,9 +61,11 @@ const Home: NextPage = () => {
<Typography variant="h1" fontSize={40} color="primary.main">
A11Y INYERFACE
</Typography>
<Container sx={{ width: "800px" }}>{presentationText}</Container>
<Container sx={{ width: isMobile ? "100%" : "800px" }}>
{presentationText}
</Container>
<Stack spacing="2em" textAlign="center" justifyContent="center">
<Stack direction="row" justifyContent="center" spacing="5em">
<Stack direction="row" justifyContent="center">
<Image
src={require("/public/images/apple-pie.jpeg")}
alt=""
Expand Down

0 comments on commit 3e4bb55

Please sign in to comment.