Skip to content

Commit

Permalink
Website Redesign: Release 1 navigation bars orcasound#127
Browse files Browse the repository at this point in the history
* Added blue wavy line png
* Hovering over navigation item will display the blue wavy line
  • Loading branch information
yyu233 committed Nov 17, 2023
1 parent 9a6d4d6 commit d85bd32
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 21 deletions.
Binary file added public/images/blue-wave.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 42 additions & 21 deletions src/components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import Image from 'next/image'
import Link from 'next/link'
import React, { useState } from 'react'

import blueWaveLine from '../../public/images/blue-wave.png'
import orcasoundlogo from '../../public/images/orcasoundlogo_2.png'
import useIsMobile from '../utils/useIsMobile'

Expand Down Expand Up @@ -52,7 +53,7 @@ const navLinks = [
},
{
name: 'Send Feedback',
url: '',
url: '/',
icon: '',
},
]
Expand Down Expand Up @@ -167,31 +168,51 @@ function Desktop() {
<React.Fragment>
<Box sx={{ display: { xs: 'none', sm: 'flex' }, flexGrow: 0.5 }}>
{navLinks.map((navLink) => (
<Button
<Box
key={navLink.name}
sx={{
m: 3,
color: 'white',
display: 'block',
textTransform: 'none',
position: 'relative',
margin: 3,
'&:hover .MuiButtonBase-root .MuiTypography-root': {
//color: 'grey',
},
'&:hover .MuiBox-root': {
opacity: 1,
},
}}
>
<Link href={navLink.url} passHref>
<Typography
//variant="h7"
component="a"
sx={{
color: 'white',
'&:hover': {
textDecoration: 'none',
<Button
key={navLink.name}
sx={{
color: 'white',
display: 'block',
textTransform: 'none',
}}
>
<Link href={navLink.url} passHref>
<Typography
component="a"
sx={{
color: 'white',
},
}}
>
{navLink.name}
</Typography>
</Link>
</Button>
textDecoration: 'none',
}}
>
{navLink.name}
</Typography>
</Link>
</Button>
<Box
sx={{
position: 'absolute',
top: '50%',
opacity: 0,
transition: 'opacity 0.3s ease-in-out',
pointerEvents: 'none',
}}
>
<Image src={blueWaveLine} />
</Box>
</Box>
))}
</Box>
<Box sx={{ display: { xs: 'none', sm: 'flex' }, flexGrow: 0.1 }}>
Expand Down

0 comments on commit d85bd32

Please sign in to comment.