Skip to content
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
13 changes: 12 additions & 1 deletion green-day-website/src/Pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ function Home() {
marginTop: 2
}}
>
<Typography variant="h2" component="h1" align="center" gutterBottom sx={{ marginTop: 4, color: '#FFFFFF', fontWeight: 'bold', textShadow: '2px 2px 4px rgba(0, 0, 0, 0.7)' }}>
<Typography variant="h2" component="h1" align="center" gutterBottom sx={{
fontSize: {
xs: '24px',
sm: '36px',
md: '48px',
lg: '64px'
},
marginTop: 4,
color: '#FFFFFF',
fontWeight: 'bold',
textShadow: '2px 2px 4px rgba(0, 0, 0, 0.7)'
}}>
Welcome to Green Day Lawn Service!
</Typography>
</Box>
Expand Down
36 changes: 29 additions & 7 deletions green-day-website/src/components/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default function NavBar() {

return (
<AppBar position="static" sx={{ backgroundColor: "#06402B" }}>
<Toolbar sx={{ px: { xs: 1.5, sm: 2.5 } }}>
<Box sx={{ display: 'flex', alignItems: 'center', flexGrow: 1 }}>
<Toolbar sx={{ px: { xs: 1.5, sm: 2.5 }, flexWrap: { xs: 'wrap', sm: 'nowrap' } }}>
<Box sx={{ display: 'flex', alignItems: 'center', flexGrow: 1, width: { xs: '100%', sm: 'auto' } }}>
<Box
component="img"
src={logo}
Expand All @@ -36,15 +36,37 @@ export default function NavBar() {
ml: 0.5
}}
/>
Comment on lines 36 to 38

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest commit. The Toolbar now has flexWrap: { xs: 'wrap', sm: 'nowrap' } and the logo/title Box has width: { xs: '100%', sm: 'auto' }, so on small screens the logo and title occupy the full first row and the nav buttons wrap to the next line.

<Typography variant="h6" component="div">
<Typography variant="h6" component="div" sx={styles.navTitle}>
Green Day Lawn Service
</Typography>
</Box>
<Button variant="outlined" color="inherit" sx={{ marginLeft: 4 }} onClick={() => handleNavClick("/")}>Home</Button>
<Button variant="outlined" color="inherit" sx={{ marginLeft: 4 }} onClick={() => handleNavClick("/lawn-programs")}>Lawn Programs</Button>
<Button variant="outlined" color="inherit" sx={{ marginLeft: 4 }} onClick={() => handleNavClick("/services")}>Services</Button>
<Button variant="outlined" color="inherit" sx={{ marginLeft: 4 }} onClick={() => handleNavClick("/contact")}>Contact</Button>
<Button variant="outlined" color="inherit" sx={styles.navButton} onClick={() => handleNavClick("/")}>Home</Button>
<Button variant="outlined" color="inherit" sx={styles.navButton} onClick={() => handleNavClick("/lawn-programs")}>Lawn Programs</Button>
<Button variant="outlined" color="inherit" sx={styles.navButton} onClick={() => handleNavClick("/services")}>Services</Button>
<Button variant="outlined" color="inherit" sx={styles.navButton} onClick={() => handleNavClick("/contact")}>Contact</Button>
</Toolbar>
</AppBar>
);
}

const styles = {
navButton: {
marginLeft: {
xs: 2,
sm: 4,
},
fontSize: {
xs: '10px',
sm: '12px',
md: '14px',
lg: 'inherit'
},
},
navTitle: {
fontSize: {
xs: '14px',
sm: '20px',
md: '28px',
}
}
}
Loading