-
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.
- Loading branch information
Showing
11 changed files
with
307 additions
and
108 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import React from 'react'; | ||
import { AppBar, Toolbar } from '@mui/material'; | ||
import styled from 'styled-components'; | ||
import { Link, useNavigate } from 'react-router-dom'; | ||
|
||
const MyAppBar = () => { | ||
const navigate = useNavigate(); | ||
|
||
const handleButtonClick = () => { | ||
navigate('/'); | ||
}; | ||
|
||
return (<MyAppBarC position="static"> | ||
<MyToolbar> | ||
<Logo> | ||
<div onClick={handleButtonClick}>Avant</div> | ||
</Logo> | ||
<Center> | ||
<Link to='/game'>Game</Link> | ||
<Link to='/profile'>Profile</Link> | ||
</Center> | ||
<Right></Right> | ||
</MyToolbar> | ||
</MyAppBarC >); | ||
}; | ||
|
||
|
||
const MyToolbar = styled(Toolbar)` | ||
display: flex; | ||
align-items: center; | ||
`; | ||
|
||
const MyAppBarC = styled(AppBar)` | ||
height: 4rem; | ||
`; | ||
|
||
const Logo = styled.div` | ||
display: flex; | ||
align-items: center; | ||
color: #ffffff; | ||
&:hover { | ||
color: pink; | ||
} | ||
/* background-color: red; */ | ||
height: 100%; | ||
cursor: pointer; | ||
font-size: 1.3rem; | ||
`; | ||
|
||
const Center = styled.div` | ||
display: flex; | ||
align-items: center; | ||
/* background-color: blue; */ | ||
height: 4rem; | ||
a{ | ||
text-decoration: none; | ||
color: #ffffff; | ||
margin-left: 1rem; | ||
&:hover { | ||
color: pink; | ||
} | ||
} | ||
padding-left: 3rem; | ||
`; | ||
|
||
const Right = styled.div` | ||
display: flex; | ||
align-items: center; | ||
/* background-color: yellow; */ | ||
`; | ||
|
||
export default MyAppBar; |
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { createTheme } from '@mui/material/styles'; | ||
import MyAppBar from './../components/MyAppBar'; | ||
import styled from 'styled-components'; | ||
import Footer from "../components/MyFooter"; | ||
import { ThemeProvider } from '@mui/material/styles'; | ||
import { Typography, Container } from '@mui/material'; | ||
|
||
const theme = createTheme({ | ||
palette: { | ||
primary: { | ||
main: 'rgba(59,130,246,.9)', // Your desired primary color | ||
}, | ||
}, | ||
}); | ||
|
||
function ProfilePage() { | ||
return ( | ||
<ThemeProvider theme={theme}> | ||
<CenterDiv > | ||
<MyAppBar /> | ||
<MyContainer> | ||
<Typography color={"black"} variant="h4" align="center" height={100}> | ||
Vanlu Gao | ||
</Typography> | ||
</MyContainer> | ||
<Footer /> | ||
</CenterDiv> | ||
</ThemeProvider > | ||
); | ||
} | ||
|
||
const CenterDiv = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
flex-wrap: wrap; | ||
`; | ||
|
||
const MyContainer = styled(Container)` | ||
min-height: 100vh; | ||
min-width: 80vw; | ||
padding: 4rem; | ||
margin-top: 1rem; | ||
border-radius: 0.5rem; | ||
background-color: #eeeeee; | ||
`; | ||
|
||
export default ProfilePage; |