-
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
1 parent
3488c14
commit 3b9f14a
Showing
14 changed files
with
157 additions
and
35 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,15 @@ | ||
header.navbar { | ||
position: sticky; | ||
top: 0; | ||
z-index: 10; | ||
> ul.menu { | ||
padding-top: 10px; | ||
.imageContainer { | ||
margin-right: auto; | ||
padding-bottom: 10px; | ||
.image { | ||
width: 40px; | ||
} | ||
} | ||
} | ||
} |
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,42 @@ | ||
import { Image, Menu } from 'antd'; | ||
import styles from './Navbar.module.scss'; | ||
import { BarChartOutlined, DatabaseOutlined, TeamOutlined, UserOutlined } from '@ant-design/icons'; | ||
import logo from '../../assets/ctm_logo.png'; | ||
import { Link } from 'react-router-dom'; | ||
import { ROUTES } from '../../constants/routes'; | ||
|
||
const Navbar = () => { | ||
return ( | ||
<header className={styles.navbar}> | ||
<Menu mode="horizontal" className={styles.menu}> | ||
<Menu.Item key="logo" className={styles.imageContainer}> | ||
<Link to={ROUTES.HOME}> | ||
<Image preview={false} src={logo} className={styles.image} /> | ||
</Link> | ||
</Menu.Item> | ||
<Menu.Item key="1" icon={<BarChartOutlined />}> | ||
<Link to={ROUTES.LATEST_LEADERBOARDS}> | ||
2023 Leaderboards | ||
</Link> | ||
</Menu.Item> | ||
<Menu.Item key="2" icon={<DatabaseOutlined />}> | ||
<Link to={ROUTES.LATEST_LEADERBOARDS}> | ||
Custom Leaderboards | ||
</Link> | ||
</Menu.Item> | ||
<Menu.Item key="3" icon={<UserOutlined />}> | ||
<Link to={ROUTES.LATEST_LEADERBOARDS}> | ||
Player profiles | ||
</Link> | ||
</Menu.Item> | ||
<Menu.Item key="4" icon={<TeamOutlined />}> | ||
<Link to={ROUTES.LATEST_LEADERBOARDS}> | ||
Player vs Player | ||
</Link> | ||
</Menu.Item> | ||
</Menu> | ||
</header> | ||
); | ||
}; | ||
|
||
export default Navbar; |
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,7 @@ | ||
export const ROUTES = { | ||
HOME: '/', | ||
LATEST_LEADERBOARDS: '/latest-leaderboards', | ||
CUSTOM_LEADERBOARDS: '/custom-leaderboards', | ||
PLAYER_PROFILE: '/player', | ||
PLAYER_VS_PLAYER: '/player-vs-player', | ||
}; |
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 @@ | ||
const CustomLeaderboards = () => <p>Building...</p>; | ||
|
||
export default CustomLeaderboards; |
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,4 +1,16 @@ | ||
@use '../../styles/responsive' as r; | ||
|
||
.container { | ||
max-width: 620px; | ||
margin: 80px auto 0 auto; | ||
max-width: 1400px; | ||
margin: 40px auto 0 auto; | ||
.statsContainer { | ||
max-width: 620px; | ||
margin: 0 auto; | ||
@include r.desktop { | ||
max-width: none; | ||
display: grid; | ||
gap: 40px; | ||
grid-template-columns: repeat(3, 1fr); | ||
} | ||
} | ||
} |
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,3 @@ | ||
const LatestLeaderboards = () => <p>Building...</p>; | ||
|
||
export default LatestLeaderboards; |
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 @@ | ||
const PlayerProfile = () => <p>Building...</p>; | ||
|
||
export default PlayerProfile; |
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 @@ | ||
const PlayerVsPlayer = () => <p>Building...</p>; | ||
|
||
export default PlayerVsPlayer; |
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,13 +1,42 @@ | ||
import { createBrowserRouter } from 'react-router-dom'; | ||
import Homepage from './pages/Home/Home'; | ||
import { ROUTES } from './constants/routes'; | ||
import LatestLeaderboards from './pages/LatestLeaderboards/LatestLeaderboards'; | ||
import CustomLeaderboards from './pages/CustomLeaderboards/CustomLeaderboards'; | ||
import PlayerVsPlayer from './pages/PlayerVsPlayer/PlayerVsPlayer'; | ||
import PlayerProfile from './pages/PlayerProfile/PlayerProfile'; | ||
|
||
const router = createBrowserRouter([ | ||
{ | ||
path: '/', | ||
path: ROUTES.HOME, | ||
element: ( | ||
<Homepage /> | ||
), | ||
}, | ||
{ | ||
path: ROUTES.LATEST_LEADERBOARDS, | ||
element: ( | ||
<LatestLeaderboards /> | ||
), | ||
}, | ||
{ | ||
path: ROUTES.CUSTOM_LEADERBOARDS, | ||
element: ( | ||
<CustomLeaderboards /> | ||
), | ||
}, | ||
{ | ||
path: ROUTES.PLAYER_PROFILE, | ||
element: ( | ||
<PlayerProfile /> | ||
), | ||
}, | ||
{ | ||
path: ROUTES.PLAYER_VS_PLAYER, | ||
element: ( | ||
<PlayerVsPlayer /> | ||
), | ||
}, | ||
]); | ||
|
||
export default router; |
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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
@use './colors.scss' as c; | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
text-rendering: optimizeSpeed; | ||
line-height: 1.5; | ||
background-color: c.$background; | ||
} |