-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
269 additions
and
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.border-radius { | ||
border-radius: 10px; | ||
} |
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 |
---|---|---|
@@ -1,93 +1,122 @@ | ||
import * as React from 'react'; | ||
import AppBar from '@mui/material/AppBar'; | ||
import Box from '@mui/material/Box'; | ||
import Toolbar from '@mui/material/Toolbar'; | ||
import MenuIcon from '@mui/icons-material/Menu'; | ||
import IconButton from '@mui/material/IconButton'; | ||
import Button from '@mui/material/Button'; | ||
import Link from '@mui/material/Link'; | ||
import * as React from "react"; | ||
import AppBar from "@mui/material/AppBar"; | ||
import Box from "@mui/material/Box"; | ||
import Toolbar from "@mui/material/Toolbar"; | ||
import MenuIcon from "@mui/icons-material/Menu"; | ||
import IconButton from "@mui/material/IconButton"; | ||
import Button from "@mui/material/Button"; | ||
import Link from "@mui/material/Link"; | ||
|
||
import GitHubIcon from '@mui/icons-material/GitHub'; | ||
import Menu from '@mui/material/Menu'; | ||
import MenuItem from '@mui/material/MenuItem'; | ||
|
||
|
||
import { GITHUB_REPO } from '../config/contants'; | ||
import GitHubIcon from "@mui/icons-material/GitHub"; | ||
import Menu from "@mui/material/Menu"; | ||
import MenuItem from "@mui/material/MenuItem"; | ||
import { useTheme } from "@mui/material/styles"; | ||
import { GITHUB_REPO } from "../config/contants"; | ||
import { Typography } from "@mui/material"; | ||
export default function MenuAppBar() { | ||
const pages = ["TV", "Radios", "Contributing"]; | ||
const [anchorEl, setAnchorEl] = React.useState(null); | ||
const open = Boolean(anchorEl); | ||
const handleClick = (event) => { | ||
setAnchorEl(event.currentTarget); | ||
}; | ||
const handleClose = () => { | ||
setAnchorEl(null); | ||
}; | ||
const theme = useTheme(); | ||
console.log(theme); | ||
return ( | ||
<> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<AppBar | ||
position="fixed" | ||
component="nav" | ||
color="transparent" | ||
style={{ | ||
backdropFilter: "blur(20px)", | ||
// backgroundColor: "rgb(28 29 31 / 19%)", | ||
boxShadow: "none", | ||
borderBottom: `0.5px solid ${theme.palette.divider}`, | ||
}} | ||
> | ||
<Toolbar> | ||
<Menu | ||
id="basic-menu" | ||
anchorEl={anchorEl} | ||
open={open} | ||
onClose={handleClose} | ||
MenuListProps={{ | ||
"aria-labelledby": "basic-button", | ||
}} | ||
> | ||
{pages.map((page, i) => ( | ||
<MenuItem onClick={handleClose} key={i}> | ||
{page} | ||
</MenuItem> | ||
))} | ||
</Menu> | ||
<Box sx={{ display: { xs: "block", md: "none" } }}> | ||
<IconButton | ||
size="large" | ||
aria-label="account of current user" | ||
aria-controls="menu-appbar" | ||
aria-haspopup="true" | ||
color="inherit" | ||
edge="start" | ||
onClick={handleClick} | ||
> | ||
<MenuIcon /> | ||
</IconButton> | ||
</Box> | ||
|
||
const pages = ['TV', 'Radios', 'Contributing']; | ||
const [anchorEl, setAnchorEl] = React.useState(null); | ||
const open = Boolean(anchorEl); | ||
const handleClick = (event) => { | ||
setAnchorEl(event.currentTarget); | ||
}; | ||
const handleClose = () => { | ||
setAnchorEl(null); | ||
}; | ||
|
||
return (<> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<AppBar position="fixed" component="nav"> | ||
<Toolbar> | ||
|
||
<Menu | ||
id="basic-menu" | ||
anchorEl={anchorEl} | ||
open={open} | ||
onClose={handleClose} | ||
MenuListProps={{ | ||
'aria-labelledby': 'basic-button', | ||
}} | ||
> | ||
{pages.map((page, i) => (<MenuItem onClick={handleClose} key={i}>{page}</MenuItem>))} | ||
</Menu> | ||
<Box sx={{ display: { xs: 'block', md: 'none' } }}> | ||
<IconButton | ||
size="large" | ||
aria-label="account of current user" | ||
aria-controls="menu-appbar" | ||
aria-haspopup="true" | ||
color="inherit" | ||
edge="start" | ||
onClick={handleClick}> | ||
<MenuIcon /> | ||
</IconButton> | ||
</Box> | ||
|
||
|
||
<img src="/logo.svg" alt="nahieran-js-logo" style={{ width: "200px" }} /> | ||
|
||
<Box sx={{ flexGrow: 1, display: { xs: 'none', md: 'flex' } }} justifyContent="center"> | ||
|
||
{pages.map((page, i) => ( | ||
<Link href={`#${page}`} key={i} color="inherit" underline="none"> | ||
<Button | ||
key={page} | ||
sx={{ my: 2, color: 'white', display: 'block' }} | ||
|
||
> | ||
{page} | ||
</Button> | ||
</Link> | ||
))} | ||
</Box> | ||
|
||
<Link href={GITHUB_REPO} color="inherit" underline="none" target="_blank"> | ||
<IconButton | ||
size="large" | ||
aria-label="nahieran-js github repository" | ||
aria-controls="menu-appbar" | ||
aria-haspopup="true" | ||
color="inherit" | ||
edge="end" | ||
> | ||
<GitHubIcon /> | ||
</IconButton> | ||
</Link> | ||
</Toolbar> | ||
</AppBar> | ||
|
||
{/* <img | ||
src="/logo.svg" | ||
alt="nahieran-js-logo" | ||
style={{ width: "200px" }} | ||
/> */} | ||
<Typography variant="h4">NahieranJS</Typography> | ||
<Box | ||
sx={{ | ||
flexGrow: 1, | ||
marginLeft: 5, | ||
display: { xs: "none", md: "flex" }, | ||
}} | ||
// justifyContent="center" | ||
> | ||
{pages.map((page, i) => ( | ||
<Link | ||
href={`#${page}`} | ||
key={i} | ||
color="inherit" | ||
underline="none" | ||
> | ||
<Button key={page} sx={{ my: 2, display: "block" }}> | ||
{page} | ||
</Button> | ||
</Link> | ||
))} | ||
</Box> | ||
|
||
</Box> | ||
</>); | ||
} | ||
<Link | ||
href={GITHUB_REPO} | ||
color="inherit" | ||
underline="none" | ||
target="_blank" | ||
> | ||
<IconButton | ||
size="large" | ||
aria-label="nahieran-js github repository" | ||
aria-controls="menu-appbar" | ||
aria-haspopup="true" | ||
color="inherit" | ||
edge="end" | ||
> | ||
<GitHubIcon /> | ||
</IconButton> | ||
</Link> | ||
</Toolbar> | ||
</AppBar> | ||
</Box> | ||
</> | ||
); | ||
} |
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
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.