-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from aodn/bugfix/5807-fix-landing-page
🐛 fix browser compatibility and footer
- Loading branch information
Showing
8 changed files
with
150 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { | |
IconButton, | ||
InputBase, | ||
Paper, | ||
SxProps, | ||
Typography, | ||
} from "@mui/material"; | ||
import MenuIcon from "@mui/icons-material/Menu"; | ||
|
@@ -24,11 +25,22 @@ import { | |
color, | ||
fontSize, | ||
gap, | ||
margin, | ||
padding, | ||
} from "../../../styles/constants"; | ||
import AODNSiteLogo from "./AODNSiteLogo"; | ||
import SectionContainer from "./SectionContainer"; | ||
|
||
interface IconContainerProps { | ||
children: JSX.Element; | ||
sx?: SxProps; | ||
} | ||
const IconContainer: FC<IconContainerProps> = ({ children, sx }) => ( | ||
<Icon sx={{ color: "#000", display: "flex", alignItems: "center", ...sx }}> | ||
{children} | ||
</Icon> | ||
); | ||
|
||
const handleBackToTop = () => { | ||
window.scrollTo({ | ||
top: 0, | ||
|
@@ -37,6 +49,7 @@ const handleBackToTop = () => { | |
}; | ||
|
||
const currentYear = dayjs(new Date()).year(); | ||
const version = import.meta.env.VITE_APP_VERSION; | ||
|
||
const Footer: FC = () => { | ||
return ( | ||
|
@@ -46,18 +59,18 @@ const Footer: FC = () => { | |
<AODNSiteLogo /> | ||
<Box> | ||
<Button> | ||
<Icon sx={{ color: "#000", paddingBottom: padding.small }}> | ||
<IconContainer> | ||
<MenuIcon fontSize="small" /> | ||
</Icon> | ||
<Typography color="#000" paddingTop={gap.md}> | ||
</IconContainer> | ||
<Typography color="#000" paddingTop={0}> | ||
Site Menu | ||
</Typography> | ||
</Button> | ||
<Button onClick={handleBackToTop}> | ||
<Icon sx={{ color: "#000", paddingBottom: padding.small }}> | ||
<IconContainer> | ||
<NorthIcon fontSize="small" /> | ||
</Icon> | ||
<Typography color="#000" paddingTop={gap.md}> | ||
</IconContainer> | ||
<Typography color="#000" paddingTop={0}> | ||
Back to Top | ||
</Typography> | ||
</Button> | ||
|
@@ -106,9 +119,11 @@ const Footer: FC = () => { | |
overflow: "hidden", | ||
}} | ||
> | ||
<Icon sx={{ p: padding.extraSmall, pb: "8px" }}> | ||
<IconContainer | ||
sx={{ marginX: margin.lg, color: color.blue.extraDark }} | ||
> | ||
<MailOutlineIcon /> | ||
</Icon> | ||
</IconContainer> | ||
<InputBase | ||
sx={{ flex: 1, p: 0 }} | ||
placeholder="[email protected]" | ||
|
@@ -171,7 +186,8 @@ const Footer: FC = () => { | |
<Grid container> | ||
<Grid item xs={6}> | ||
<Typography color="#000" fontSize={fontSize.subscription}> | ||
@IMOS {currentYear} | ||
Copyright © {currentYear}. All rights reserved. Version : | ||
{version} | ||
</Typography> | ||
</Grid> | ||
<Grid | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/menu/MainMenu.tsx → ...components/layout/components/MainMenu.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.