Skip to content

Commit

Permalink
fix: grid layout fix on mobile, hero banner on header
Browse files Browse the repository at this point in the history
  • Loading branch information
cfuisat committed Aug 19, 2024
1 parent c441aff commit 573ddc3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 14 deletions.
11 changes: 11 additions & 0 deletions public/assets/hero-banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const CardanoExplorer = () => {
</Alert>
)}
</Typography>
<Grid container spacing={3}>
<Grid container spacing={2} sx={{display: { xs: 'grid', sm: 'flex' }, justifyContent: 'center', alignItems: 'center'}}>
{selectedExplorer ? (
<Grid item xs={12}>
<CardLink
Expand Down
4 changes: 2 additions & 2 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function Footer() {
bottom: 0
}}
>
<Grid container spacing={2} style={{color: "white", marginTop: "1px", fontSize: "small"}}>
<Grid container spacing={1} style={{color: "#ebedf0", marginTop: "1px", fontSize: "14px", cursor: 'pointer'}}>
<Grid item xs={3}/>
<Grid item xs={2} style={{textAlign: "center"}}>
<div style={{fontWeight: "bold"}}>Support</div>
Expand All @@ -35,7 +35,7 @@ function Footer() {
<div onClick={() => location.href = 'https://cardanofoundation.org'}>News</div>
<div onClick={() => location.href = 'https://developers.cardano.org/docs/portal-contribute/'}>Contribute</div>
</Grid>
<Grid item xs={3}/>

<Grid item xs={12} style={{textAlign: "center", color: "white", fontSize: "small"}}>
® Cardano
</Grid>
Expand Down
35 changes: 24 additions & 11 deletions src/components/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
// src/components/Header.jsx
import React from "react";
import { Box, Typography } from "@mui/material";
import { Box, Typography, styled } from "@mui/material";
import cardanoLogo from "/assets/logo.svg";
import githubLogo from "/assets/github.svg";

export const HeaderSection = styled("header")`
width: 100%;
height: 280px;
overflow: hidden;
background: url('/assets/hero-banner.svg');
&::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 66%;
background-image: linear-gradient(248deg, #305bbd, #0035ad);
z-index: -1;
}
`;

function Header() {

return (
<>
<Box
Expand All @@ -20,15 +40,8 @@ function Header() {
<img src={githubLogo} style={{float: "right", margin: '1rem 1.05rem 0 0'}}/>
</a>
</Box>
<Box
component="header"
sx={{
width: "100%",
overflow: "hidden",
background: "#0538AF",
}}
>
<Box sx={{marginLeft: 4, padding: 3}}>
<HeaderSection>
<Box sx={{margin: '0 auto', padding: '83px'}}>
<Typography variant="h1" gutterBottom
sx={{margin: '1rem 0 0 1.05rem', color: "#fff", fontSize: '3rem', fontWeight: '700'}}>
Explorers
Expand All @@ -37,7 +50,7 @@ function Header() {
List of Cardano Explorers from our Community and Foundation.
</Typography>
</Box>
</Box>
</HeaderSection>
</>
);
}
Expand Down

0 comments on commit 573ddc3

Please sign in to comment.