CSS smalls changes (headers, ranking colors)
+ mode "cinema" in Game.svelte
This commit is contained in:
@@ -42,16 +42,6 @@
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Bit5x3";
|
||||
src:
|
||||
url("/fonts/Bit5x3.woff2") format("woff2"),
|
||||
local("Bit5x3"),
|
||||
url("/fonts/Bit5x3.woff") format("woff");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
})
|
||||
|
||||
function resetPage() {
|
||||
hiddenGame = true;
|
||||
setHiddenGame(true);
|
||||
showGameOptions = true;
|
||||
showInvitations = false;
|
||||
showError = false;
|
||||
@@ -98,7 +98,7 @@
|
||||
watchMatchStartInterval = setInterval(watchMatchStart, watchMatchStartIntervalRate);
|
||||
watchGameStateInterval = setInterval(watchGameState, watchGameStateIntervalRate);
|
||||
pong.init(matchOptions, options, gameAreaId, token);
|
||||
hiddenGame = false;
|
||||
setHiddenGame(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -136,7 +136,7 @@
|
||||
}
|
||||
pong.init(invitation.gameOptions, options, gameAreaId, invitation.token);
|
||||
showWaitPage = false;
|
||||
hiddenGame = false;
|
||||
setHiddenGame(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,6 +213,16 @@
|
||||
resetPage();
|
||||
};
|
||||
|
||||
function setHiddenGame(value: boolean) {
|
||||
if (value) {
|
||||
document.getElementById("game_page").classList.remove("dim_background");
|
||||
}
|
||||
else {
|
||||
document.getElementById("game_page").classList.add("dim_background");
|
||||
}
|
||||
hiddenGame = value;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<Header />
|
||||
@@ -352,19 +362,9 @@
|
||||
</div> <!-- div "game_page" -->
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Bit5x3";
|
||||
src:
|
||||
url("/fonts/Bit5x3.woff2") format("woff2"),
|
||||
local("Bit5x3"),
|
||||
url("/fonts/Bit5x3.woff") format("woff");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
#game_page {
|
||||
margin: 0;
|
||||
background-color: #222425;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@@ -384,7 +384,7 @@
|
||||
}
|
||||
canvas {
|
||||
/* background-color: #ff0000; */
|
||||
background-color: #333333;
|
||||
background-color: #333;
|
||||
max-width: 75vw;
|
||||
/* max-height: 100vh; */
|
||||
width: 80%;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
playerOneAvatar = await fetchAvatar(gameState.playerOneUsername);
|
||||
playerTwoAvatar = await fetchAvatar(gameState.playerTwoUsername);
|
||||
|
||||
hiddenGame = false;
|
||||
setHiddenGame(false);
|
||||
};
|
||||
|
||||
const watchGameState = () => {
|
||||
@@ -70,7 +70,7 @@
|
||||
};
|
||||
|
||||
async function resetPage() {
|
||||
hiddenGame = true;
|
||||
setHiddenGame(true);
|
||||
pongSpectator.destroy();
|
||||
matchList = await fetchMatchList();
|
||||
};
|
||||
@@ -93,6 +93,16 @@
|
||||
});
|
||||
};
|
||||
|
||||
function setHiddenGame(value: boolean) {
|
||||
if (value) {
|
||||
document.getElementById("game_page").classList.remove("dim_background");
|
||||
}
|
||||
else {
|
||||
document.getElementById("game_page").classList.add("dim_background");
|
||||
}
|
||||
hiddenGame = value;
|
||||
}
|
||||
|
||||
</script>
|
||||
<!-- -->
|
||||
|
||||
@@ -164,21 +174,10 @@
|
||||
|
||||
<!-- -->
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Bit5x3";
|
||||
src:
|
||||
url("/fonts/Bit5x3.woff2") format("woff2"),
|
||||
local("Bit5x3"),
|
||||
url("/fonts/Bit5x3.woff") format("woff");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
#game_page {
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background-color: #222425;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
<tr>
|
||||
<th>{i + 1}</th>
|
||||
{#if user.username === currentUser.username}
|
||||
<td><b>You ({user.username})</b></td>
|
||||
<td><b>{user.username} [You]</b></td>
|
||||
{:else}
|
||||
<td>{user.username}</td>
|
||||
<td>{user.username}</td>
|
||||
{/if}
|
||||
<td>{user.stats.winGame}</td>
|
||||
<td>{user.stats.loseGame}</td>
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<style>
|
||||
|
||||
.principal-div {
|
||||
.principal-div {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@@ -90,15 +90,10 @@
|
||||
}
|
||||
|
||||
.stats-table tbody tr:nth-of-type(even) {
|
||||
background-color: #f3f3f3;
|
||||
background-color: #555;
|
||||
}
|
||||
|
||||
.stats-table tbody tr:last-of-type {
|
||||
border-bottom: 2px solid #618174;
|
||||
}
|
||||
|
||||
.stats-table tbody tr.active-row {
|
||||
font-weight: bold;
|
||||
color: #618174;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -34,24 +34,13 @@
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Bit5x3";
|
||||
src:
|
||||
url("/fonts/Bit5x3.woff2") format("woff2"),
|
||||
local("Bit5x3"),
|
||||
url("/fonts/Bit5x3.woff") format("woff");
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.header div.center button.selected {
|
||||
text-decoration: underline;
|
||||
background-color: #2B3A67;
|
||||
background-color: #8c0000;
|
||||
}
|
||||
|
||||
.header div.center button {
|
||||
background-color: #8c0000;
|
||||
background-color: #444;
|
||||
border-color: #071013;
|
||||
color: white;
|
||||
font-family: "Bit5x3";
|
||||
|
||||
Reference in New Issue
Block a user