Update GameOver.html

This commit is contained in:
Doveliyuchen 2023-03-07 20:53:03 +08:00
parent 551013c736
commit d7b36a5654

View File

@ -58,12 +58,13 @@
} }
.cirButton { .cirButton {
width: 100%; width: 40%;
height: 60px; height: 60px;
border-radius: 40px; border-radius: 40px;
cursor: pointer; cursor: pointer;
border: none; border: none;
font-weight: 600; font-weight: 600;
} }
.cirButton:hover { .cirButton:hover {
@ -177,24 +178,6 @@
</div> </div>
</div> </div>
</nav> </nav>
<script>
window.onload = function () {
console.log("{{finish}}");
var fini = document.getElementById("Finish");
console.log("{{finish}}" == "1")
if ("{{finish}}" == "1") {
fini.style.visibility = "visible";
if ('{{stage}}' == '2') {
fini.innerText = "Finish"
} else {
fini.innerText = "Go to Phase II"
}
} else {
fini.style.visibility = "hidden";
}
}
</script>
<section id="Over"> <section id="Over">
<div class="container"> <div class="container">
@ -205,25 +188,12 @@
<h3> <h3>
Do you want to play another round? Do you want to play another round?
</h3> </h3>
<button onclick="window.location.href = '/gameplay2';" class="cirButton">Yes</button> <br>
<button onclick="window.location.href = 'about:blank';" class="cirButton">No</button> <button onclick="window.location.href = '/gameplay2';" class="cirButton">Yes, I want another round</button>
<div> <br>
<button onclick=" <br>
if('{{stage}}' == '2'){ <button onclick="window.location.href = 'window.close';" class="cirButton">No, and close the window</button>
window.location.href = '/gameplay2';
}else{
window.location.href = '/again'
}
" style="visibility: hidden">Keep Playing!</button>
<button id="Finish" onclick="
if('{{stage}}' == '2'){
window.location.href = 'about:blank';
window.close();
}else{
window.location.href = '/gameplay2';
}
" style="visibility: hidden" class="cirButton">Finish!</button>
</div>
</div> </div>
</section> </section>