Skip to content

Commit

Permalink
Merge pull request #1236 from kleros/fix(web)/padding-bottom-homepage
Browse files Browse the repository at this point in the history
fix(web): layout unexpected paddings
  • Loading branch information
alcercu authored Sep 20, 2023
2 parents d1e355a + 03d1634 commit 69d61b9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
12 changes: 11 additions & 1 deletion web/src/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Header from "./Header";
import Footer from "./Footer";

const Container = styled.div`
display: flex;
flex-direction: column;
min-height: 100%;
width: 100%;
`;
Expand All @@ -23,6 +25,11 @@ const StyledToastContainer = styled(ToastContainer)`
padding-top: 70px;
`;

const OutletContainer = styled.div`
flex: 1;
background-color: ${({ theme }) => theme.lightBackground};
`;

const Layout: React.FC = () => {
const containerRef = useRef(null);

Expand All @@ -32,7 +39,10 @@ const Layout: React.FC = () => {
<Container>
<Header />
<StyledToastContainer />
<Outlet />
<OutletContainer>
<Outlet />
</OutletContainer>

<Footer />
</Container>
</StyledOverlayScrollbarsComponent>
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/Cases/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { BREAKPOINT_LANDSCAPE } from "styles/landscapeStyle";
import CasesDisplay from "components/CasesDisplay";
import CaseDetails from "./CaseDetails";
import { useFiltersContext } from "context/FilterProvider";

const Container = styled.div`
width: 100%;
min-height: calc(100vh - 144px);
background-color: ${({ theme }) => theme.lightBackground};
padding: calc(32px + (136 - 32) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
padding-top: calc(32px + (80 - 32) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
Expand Down
1 change: 0 additions & 1 deletion web/src/pages/Courts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import CourtDetails from "./CourtDetails";

const Container = styled.div`
width: 100%;
min-height: calc(100vh - 144px);
background-color: ${({ theme }) => theme.lightBackground};
padding: calc(32px + (136 - 32) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
padding-top: calc(32px + (80 - 32) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
Expand Down
1 change: 0 additions & 1 deletion web/src/pages/Dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import ConnectWallet from "components/ConnectWallet";

const Container = styled.div`
width: 100%;
min-height: calc(100vh - 144px);
background-color: ${({ theme }) => theme.lightBackground};
padding: calc(32px + (136 - 32) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
padding-top: calc(32px + (80 - 32) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
Expand Down
1 change: 0 additions & 1 deletion web/src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { getOneYearAgoTimestamp } from "utils/date";

const Container = styled.div`
width: 100%;
min-height: calc(100vh - 144px);
background-color: ${({ theme }) => theme.lightBackground};
padding: calc(32px + (132 - 32) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
padding-top: calc(32px + (72 - 32) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
Expand Down

0 comments on commit 69d61b9

Please sign in to comment.