-
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
Jakub-prog
committed
May 24, 2024
1 parent
4d4860f
commit c7f9e80
Showing
12 changed files
with
395 additions
and
165 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
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,44 @@ | ||
import React from 'react'; | ||
import './Home.scss'; | ||
|
||
function Home({ isAuthenticated }) { | ||
return ( | ||
<div className="home"> | ||
<div className="welcome-box"> | ||
<h1>Welcome to Bot-Wars!</h1> | ||
{isAuthenticated ? ( | ||
<p>Welcome back! Check out our latest tournaments and games.</p> | ||
) : ( | ||
<p>Join us today and start competing in our exciting tournaments!</p> | ||
)} | ||
</div> | ||
<div className="info-boxes"> | ||
{isAuthenticated ? ( | ||
<> | ||
<div className="info-box"> | ||
<h2>Your Dashboard</h2> | ||
<p>View your current standings, upcoming matches, and more.</p> | ||
</div> | ||
<div className="info-box"> | ||
<h2>Latest Tournaments</h2> | ||
<p>Stay updated with the latest tournaments and events.</p> | ||
</div> | ||
</> | ||
) : ( | ||
<> | ||
<div className="info-box"> | ||
<h2>Why Join Bot-Wars?</h2> | ||
<p>Compete with players from around the world and prove your skills.</p> | ||
</div> | ||
<div className="info-box"> | ||
<h2>How to Get Started</h2> | ||
<p>Sign up, create your profile, and join your first tournament today.</p> | ||
</div> | ||
</> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Home; |
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,56 @@ | ||
.home { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 20px; | ||
background-color: #f4f4f4; | ||
|
||
.welcome-box { | ||
background: #fff; | ||
border: 1px solid #ddd; | ||
border-radius: 10px; | ||
padding: 20px; | ||
margin-bottom: 20px; | ||
text-align: center; | ||
width: 80%; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
|
||
h1 { | ||
color: #333; | ||
margin-bottom: 10px; | ||
} | ||
|
||
p { | ||
color: #666; | ||
font-size: 1.2em; | ||
} | ||
} | ||
|
||
.info-boxes { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
justify-content: center; | ||
width: 100%; | ||
|
||
.info-box { | ||
background: #fff; | ||
border: 1px solid #ddd; | ||
border-radius: 10px; | ||
padding: 20px; | ||
width: 300px; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
text-align: center; | ||
|
||
h2 { | ||
color: #333; | ||
margin-bottom: 10px; | ||
} | ||
|
||
p { | ||
color: #666; | ||
font-size: 1em; | ||
} | ||
} | ||
} | ||
} |
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,38 @@ | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import User from './User/User'; | ||
import './Navbar.scss'; | ||
|
||
function Navbar({ isAuthenticated, user }) { | ||
return ( | ||
<div className="navbar"> | ||
<div className="logo"> | ||
<h1>Bot-Wars</h1> | ||
</div> | ||
<nav className="nav"> | ||
<div className="menu-btns"> | ||
<div className="menu-btn"> | ||
<Link to="tournaments/home"> | ||
<button className="btn">Tournaments</button> | ||
</Link> | ||
</div> | ||
<div className="menu-btn"> | ||
<Link to="games"> | ||
<button className="btn">Games</button> | ||
</Link> | ||
</div> | ||
<div className="menu-btn"> | ||
<Link to="about"> | ||
<button className="btn">About us</button> | ||
</Link> | ||
</div> | ||
<div className="menu-btn"> | ||
<User isAuthenticated={isAuthenticated} user={user} /> | ||
</div> | ||
</div> | ||
</nav> | ||
</div> | ||
); | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
.navbar { | ||
display: flex; | ||
align-items: center; | ||
width: 100%; | ||
justify-content: space-between; | ||
padding: 10px 20px; | ||
background: rgba(0, 0, 0, 0.8); | ||
border-bottom: 1px solid #0f0; | ||
|
||
.logo { | ||
display: flex; | ||
justify-content: left; | ||
letter-spacing: 5px; | ||
|
||
h1 { | ||
margin: 0; | ||
font-size: 1.5em; | ||
color: #0f0; | ||
} | ||
} | ||
|
||
.nav { | ||
flex-grow: 1; | ||
|
||
.menu-btns { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
gap: 20px; | ||
|
||
.menu-btn { | ||
display: flex; | ||
align-items: center; | ||
margin: 10px 0 10px 5px; | ||
padding: 0; | ||
|
||
a { | ||
text-decoration: none; | ||
display: flex; | ||
align-items: center; | ||
|
||
.btn, | ||
.login-btn { | ||
padding: 10px 20px; | ||
border: none; | ||
font-weight: bold; | ||
cursor: pointer; | ||
min-width: 130px; | ||
|
||
&:hover { | ||
background: #fff; | ||
color: #000; | ||
} | ||
} | ||
|
||
.signup-btn { | ||
padding: 10px 20px; | ||
background-color: #0be400; | ||
color: #000; | ||
border-radius: 20px; | ||
font-weight: bold; | ||
cursor: pointer; | ||
min-width: 130px; | ||
margin-right: 10px; | ||
|
||
&:hover { | ||
background: #fff; | ||
color: #000; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.