0
0
Fork 0

Make the background image for the board work

This commit is contained in:
Oliver-Akins 2021-03-20 15:07:35 -06:00
parent c7e32f1f6b
commit 79b4a11bb9
4 changed files with 29 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 KiB

View file

@ -1,5 +1,8 @@
<template> <template>
<div id="GameBoard"> <div
id="GameBoard"
:class="teamClass"
>
<div id="other-team-answers" class="team-container"> <div id="other-team-answers" class="team-container">
<div class="answer-container maximize"> <div class="answer-container maximize">
<!-- <!--
@ -129,6 +132,14 @@ export default {
}; };
return new RegExp(`${this.$store.state.chosen_object.toLowerCase()}\\.?`); return new RegExp(`${this.$store.state.chosen_object.toLowerCase()}\\.?`);
}, },
teamClass() {
if (this.teamID == `sun`) {
return `sun`;
} else if (this.teamID == `moon`) {
return `moon`;
};
return ``;
},
}, },
methods: { methods: {
isCorrect(team, answerIndex) { isCorrect(team, answerIndex) {
@ -177,21 +188,33 @@ export default {
@import "../css/style.css"; @import "../css/style.css";
#GameBoard { #GameBoard {
background-color: var(--board-background);
color: var(--board-background-text); color: var(--board-background-text);
justify-content: space-evenly; justify-content: space-evenly;
padding-bottom: 10px; padding-bottom: 10px;
flex-direction: row; flex-direction: row;
position: relative; position: relative;
padding-top: 40px;
margin: 15px auto; margin: 15px auto;
display: flex; display: flex;
width: 95%; width: 95%;
} }
#GameBoard.sun {
background: var(--board-background-sun), var(--board-background);
}
#GameBoard.moon {
background: var(--board-background-moon), var(--board-background);
}
h2 { h2 {
margin: 12px 0; margin: 12px 0;
} }
#other-team-answers .answer {
justify-content: flex-end;
display: flex;
}
.team-container { .team-container {
height: 100%; height: 100%;
width: 45%; width: 45%;
@ -248,7 +271,7 @@ input[type="text"] {
font-size: larger; font-size: larger;
outline: none; outline: none;
padding: 7px; padding: 7px;
width: 90%; width: 80%;
margin: 0; margin: 0;
} }
input[type="text"]:focus { input[type="text"]:focus {
@ -266,7 +289,7 @@ input[type="text"].other-team-answer {
border-radius: 25px; border-radius: 25px;
position: absolute; position: absolute;
padding: 10px; padding: 10px;
right: 15px; right: 110px;
top: 15px; top: 15px;
} }
#past-questions-toggle:hover { background-color: var(--past-questions-button-hover); } #past-questions-toggle:hover { background-color: var(--past-questions-button-hover); }

View file

@ -54,6 +54,8 @@
is used for the text input backgrounds. is used for the text input backgrounds.
*/ */
--board-background: var(--background1); --board-background: var(--background1);
--board-background-sun: top/100% no-repeat url("/assets/gameboard-background-sun.jpg");
--board-background-moon: top/100% no-repeat url("/assets/gameboard-background-moon.jpg");
--board-background-alt: var(--background3); --board-background-alt: var(--background3);
--board-background-alt-darken: var(--background3-darken); --board-background-alt-darken: var(--background3-darken);
--board-background-alt-lighten: var(--background3-lighten); --board-background-alt-lighten: var(--background3-lighten);