Minor style fixes
parent
d9eafeb71a
commit
3a9b88ef55
|
|
@ -3,10 +3,10 @@ import { Player } from 'src/players/player';
|
||||||
export class Game {
|
export class Game {
|
||||||
gameId: string;
|
gameId: string;
|
||||||
gameCode: string;
|
gameCode: string;
|
||||||
players: Set<Player>;
|
players: Player[];
|
||||||
constructor(gameId: string, gameCode: string, player: Player) {
|
constructor(gameId: string, gameCode: string, player: Player) {
|
||||||
this.gameId = gameId;
|
this.gameId = gameId;
|
||||||
this.gameCode = gameCode;
|
this.gameCode = gameCode;
|
||||||
this.players = new Set([player]);
|
this.players = [player];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
@use "node_modules/@picocss/pico/scss/pico" with (
|
@use "node_modules/@picocss/pico/scss/pico" with (
|
||||||
$theme-color: "pumpkin"
|
$theme-color: "pumpkin"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#root, #app {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export interface AppProps {
|
||||||
|
|
||||||
const App = (props: AppProps) => {
|
const App = (props: AppProps) => {
|
||||||
return (
|
return (
|
||||||
<div className="app">
|
<div id="app">
|
||||||
<LandingPage {...props} />
|
<LandingPage {...props} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,16 @@
|
||||||
body {
|
.landing-page {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
padding: 2%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
background: linear-gradient(-45deg, #03444a, #00a8a8, #f1bc52, #ff8f4b);
|
background: linear-gradient(-45deg, #03444a, #00a8a8, #f1bc52, #ff8f4b);
|
||||||
background-size: 400% 400%;
|
background-size: 400% 400%;
|
||||||
animation: gradient 15s ease infinite;
|
animation: gradient 15s ease infinite;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
|
||||||
@keyframes gradient {
|
@keyframes gradient {
|
||||||
0% {
|
0% {
|
||||||
background-position: 0% 50%;
|
background-position: 0% 50%;
|
||||||
}
|
}
|
||||||
|
|
@ -17,13 +21,20 @@ body {
|
||||||
background-position: 0% 50%;
|
background-position: 0% 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div {
|
|
||||||
padding: 2%;
|
.landing-page-body {
|
||||||
}
|
|
||||||
button {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
#body-format {
|
|
||||||
margin: auto;
|
margin: auto;
|
||||||
max-width: 20%;
|
width: 20%;
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
> div {
|
||||||
|
padding: 2%;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
font-size: 1rem;
|
||||||
|
width: 70%;
|
||||||
|
margin-bottom: var(--pico-spacing)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,12 @@ const LandingPage = (props: LandingPageProps) => {
|
||||||
(joinLobbyPayload.lobbyId = event.target.value);
|
(joinLobbyPayload.lobbyId = event.target.value);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<div className="landing-page">
|
||||||
<div className="landing-page-title" id="landing-page-title">
|
<div>
|
||||||
<h1>Trains And Roads</h1>
|
<h1>Trains And Roads</h1>
|
||||||
</div>
|
</div>
|
||||||
<div id="body-format">
|
<div className="landing-page-body">
|
||||||
<div className="user-name-input" id="user-name-input">
|
<div>
|
||||||
<input
|
<input
|
||||||
placeholder="Enter username"
|
placeholder="Enter username"
|
||||||
onChange={registerUsername}
|
onChange={registerUsername}
|
||||||
|
|
@ -39,21 +39,20 @@ const LandingPage = (props: LandingPageProps) => {
|
||||||
Create Lobby
|
Create Lobby
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="join-lobby" id="join-lobby">
|
<div>
|
||||||
<input
|
<input
|
||||||
className="lobby-id-input"
|
|
||||||
placeholder="Enter Lobby Id"
|
placeholder="Enter Lobby Id"
|
||||||
onChange={registerLobbyId}
|
onChange={registerLobbyId}
|
||||||
></input>
|
></input>
|
||||||
<button
|
<button
|
||||||
className="join-lobby-button secondary"
|
className="secondary"
|
||||||
onClick={() => handleJoinLobby(socket, joinLobbyPayload)}
|
onClick={() => handleJoinLobby(socket, joinLobbyPayload)}
|
||||||
>
|
>
|
||||||
Join Lobby
|
Join Lobby
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
export default LandingPage;
|
export default LandingPage;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue