Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix footer styling #3

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed public/favicon.ico
Binary file not shown.
Empty file.
Binary file removed public/images/losangeles_mountains.png
Binary file not shown.
Binary file removed public/images/losangeles_mountains_2.png
Binary file not shown.
Binary file removed public/images/losangeles_mountains_copy.png
Binary file not shown.
Binary file removed public/images/peak.jpg
Binary file not shown.
Binary file removed public/images/rectangle_20.jpg
Binary file not shown.
Binary file removed public/images/rectangle_24.jpg
Binary file not shown.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/images/icon_header.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/images/icon_header.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand Down
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ const theme = createTheme({
fontFamily: 'Oswald, sans-serif',
fontWeight: 900,
color: '#414F6B',
fontSize: '4rem', // Default font size for all screens
fontSize: '4.5rem', // Default font size for all screens
'@media (min-width:600px)': {
fontSize: '6rem', // Font size for screens larger than 600px (tablet and up)
fontSize: '6.5rem', // Font size for screens larger than 600px (tablet and up)
},
'@media (min-width:1024px)': {
fontSize: '8rem', // Font size for screens larger than 1024px (desktop and up)
fontSize: '8.5rem', // Font size for screens larger than 1024px (desktop and up)
},
},
h1Secondary: {
Expand Down
8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

18 changes: 11 additions & 7 deletions src/components/footer.jsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
import React from 'react';
import { Container, Grid, Typography } from '@mui/material';
import clsx from 'clsx';
import {
Grid, Typography, Box,
} from '@mui/material';
import useCustomStyles from '../styles/useCustonStyles';
import mainStyles from '../styles';
import Logo from './logo';

const Footer = () => {
const classes = useCustomStyles(mainStyles);
return (
<Container>
<Grid container className={classes.header} justifyContent="space-between" alignItems="center">
<Box className={clsx(classes.containerPaddingSmall, classes.relativePosition)}>
<Grid container justifyContent="space-between" alignItems="center">
<Grid container item lg={3} xs={6}>
<Grid item>
<img src="images/icons/icon.png" alt="icon" />
</Grid>
<Grid item>
<Typography variant="h6">LOSANGELES</Typography>
<Typography variant="h6">MOUNTAINS</Typography>
<Grid item alignItems="center">
<Logo />
</Grid>
</Grid>
<Grid item lg={3} xs={6}>
<Typography variant="body" size="small">Copy Rights </Typography>
</Grid>
</Grid>
</Container>
<Box className={clsx(classes.absolutePosition, classes.fullCover, classes.blueDarkBg)} />
</Box>
);
};

Expand Down
22 changes: 17 additions & 5 deletions src/components/header.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState } from 'react';
import clsx from 'clsx';
import { HashLink } from 'react-router-hash-link';
import { useLocation } from 'react-router-dom';
import {
Expand All @@ -9,6 +10,7 @@ import CloseIcon from '@mui/icons-material/Close';
import useCustomStyles from '../styles/useCustonStyles';
import mainStyles from '../styles';
import styles from '../styles/components/header';
import Logo from './logo';

const Header = () => {
const theme = useTheme();
Expand All @@ -20,12 +22,22 @@ const Header = () => {

return (
<>
<Box className={localClasses.headerContainer} sx={{ backgroundColor: location.pathname === '/' ? 'transparent' : theme.palette.link.light }}>
<Box
className={
clsx(localClasses.headerContainer, location.pathname !== '/' && classes.boxShadow)
}
sx={{ backgroundColor: location.pathname === '/' ? 'transparent' : theme.palette.link.light }}
>
<Grid container className={classes.header} justifyContent="space-between" alignItems="center">
<Grid item lg={3} xs={6}>
<HashLink smooth to="/" className={localClasses.logo}>
<img src="images/icon_header.png" alt="icon" />
</HashLink>
<Grid container item lg={3} xs={6}>
<Grid item>
<HashLink smooth to="/" className={localClasses.logo}>
<img src="images/icon_header.png" alt="icon" />
</HashLink>
</Grid>
{
location.pathname !== '/' && <Grid item><Logo /></Grid>
}
</Grid>
<Grid container item lg={3} xs={6} justifyContent="space-between" style={{ display: mobile ? 'none' : 'flex' }}>
<Grid item>
Expand Down
6 changes: 3 additions & 3 deletions src/components/headlineSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ const HeadlineSection = () => {
<Box className={classes.container}>
<Box className={clsx(classes.hiddenBg)} />
<img
src="images/bg/page1_bg_169.png"
src="images/page1.jpg"
className={clsx(classes.homeContainer, classes.subContainer)}
alt="image1"
/>
<Grid container className={classes.subContainer} justifyContent="center" alignItems="center">
<Grid item>
<Typography
variant="h1"
variant="h1Secondary"
>
LOSANGELES
</Typography>
<Typography
variant="h1Secondary"
variant="h1"
>
MOUNTAINS
</Typography>
Expand Down
23 changes: 23 additions & 0 deletions src/components/logo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import clsx from 'clsx';
import {
Grid, Typography,
} from '@mui/material';
import useCustomStyles from '../styles/useCustonStyles';
import mainStyles from '../styles';

function Logo() {
const classes = useCustomStyles(mainStyles);
return (
<Grid container flexDirection="column" style={{ height: '100%' }} justifyContent="center" alignItems="center">
<Grid item>
<Typography className={clsx(classes.headline2, classes.logoText)} variant="h6">LOSANGELES</Typography>
</Grid>
<Grid item>
<Typography className={clsx(classes.headline1, classes.logoText)} variant="h6">MOUNTAINS</Typography>
</Grid>
</Grid>
);
}

export default Logo;
5 changes: 0 additions & 5 deletions src/styles/components/header.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
const styles = (theme) => ({
logo: {
'&:hove': {
opacity: 0.7,
},
},
headerContainer: {
position: 'sticky',
padding: '0 10%',
Expand Down
2 changes: 1 addition & 1 deletion src/styles/components/schedual.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const styles = (theme) => ({
container: {
padding: '20px',
background: theme.palette.link.light,
width: '400px',
maxWidth: '350px',
},
row: {
margin: '10px 0',
Expand Down
22 changes: 21 additions & 1 deletion src/styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const mainStyles = (theme) => ({
},
hiddenBg: {
opacity: 0.3,
background: 'url(images/bg/page1_bg2_169.png)',
background: 'url(images/page1_bg.png)',
position: 'absolute',
top: 0,
minHeight: '100vh',
Expand Down Expand Up @@ -59,5 +59,25 @@ const mainStyles = (theme) => ({
verticalPadding: {
padding: '5vh 10vw',
},
logoText: {
fontWeight: '900',
lineHeight: 1,
},
containerPaddingSmall: {
padding: '2vh 10vw',
},
fullCover: {
width: '100%',
height: '100%',
},
blueDarkBg: {
backgroundColor: theme.palette.blue.light,
opacity: 0.7,
top: 0,
left: 0,
},
boxShadow: {
boxShadow: `1px 1px 6px ${theme.palette.blue.dark}`,
},
});
export default mainStyles;
Loading