aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2022-01-16 20:16:24 +0100
committerThomas Voss <thomasvoss@live.com> 2022-01-16 20:16:24 +0100
commitfd951a7f158004af844cb89f80787dc2182c960a (patch)
treefde6bbe5c86363079ca50e9b85534733eb6d7d57
parent406e54709d0b04db00fcd527a6bc2989dc497047 (diff)
parent2d67768c8814b809a273413966115358f42b69b3 (diff)
Merge branch 'main' of github.com:MayteSteeghs/draughts
-rw-r--r--draughts/app.js3
-rw-r--r--draughts/public/splash.html2
-rw-r--r--draughts/public/stylesheets/splash.css27
-rw-r--r--draughts/views/splash.ejs2
4 files changed, 28 insertions, 6 deletions
diff --git a/draughts/app.js b/draughts/app.js
index 86a8c69..6d4901a 100644
--- a/draughts/app.js
+++ b/draughts/app.js
@@ -89,7 +89,7 @@ wss.on("connection", ws => {
}, ws)
game.move(msg.body)
- if (!game.nextTurn())
+ if (!game.nextTurn()){
var totalMoves = game.history.length
/* Update minimum amount of moves in stat tracker */
if (totalMoves < stats.minimumMoves){
@@ -104,6 +104,7 @@ wss.on("connection", ws => {
/* Remove ongoing game */
stats.ongoingGames--
env.removeGame(game)
+ }
break
}
})
diff --git a/draughts/public/splash.html b/draughts/public/splash.html
index 6a84b54..cdb627e 100644
--- a/draughts/public/splash.html
+++ b/draughts/public/splash.html
@@ -22,7 +22,7 @@
</div>
<div class="button">
<form action="/play" method="get">
- <button type="submit">PLAY</button>
+ <button id="button" type="submit">PLAY</button>
</form>
</div>
<div class="how how-to-1">
diff --git a/draughts/public/stylesheets/splash.css b/draughts/public/stylesheets/splash.css
index 71ba346..11acf14 100644
--- a/draughts/public/stylesheets/splash.css
+++ b/draughts/public/stylesheets/splash.css
@@ -115,7 +115,7 @@ div > img{
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
-button {
+#button {
background-color: var(--light-blue);
color: inherit;
font-size: calc(50% + 2vw);
@@ -123,23 +123,44 @@ button {
padding: 5%;
margin-left: 25%;
margin-top: 10%;
- cursor:pointer;
+ cursor: pointer;
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
+#button:active{
+ font-weight: bold;
+}
+
+#button:hover{
+ cursor: pointer;
+ background-color: var(--darker-blue)
+}
+
.how-to-1 > img {
justify-self: center;
width: fit-content;
height: 75%;
}
+.how-to-1 > h2::before {
+ content: "1 ";
+}
+
.how-to-2 > img {
justify-self: center;
height: 80%;
}
+.how-to-2 > h2::before {
+ content: "2 ";
+}
+
.how-to-3> img {
justify-self: center;
height: 50%;
opacity: 0.9;
-} \ No newline at end of file
+}
+
+.how-to-3 > h2::before {
+ content: "3 ";
+}
diff --git a/draughts/views/splash.ejs b/draughts/views/splash.ejs
index 1e86f53..335a347 100644
--- a/draughts/views/splash.ejs
+++ b/draughts/views/splash.ejs
@@ -40,7 +40,7 @@
</div>
<div class="button">
<form action="/play" method="get">
- <button type="submit">PLAY</button>
+ <button id="button" type="submit">PLAY</button>
</form>
</div>
<div class="how how-to-1">