Merge pull request #3 from PedrosUsername/feature/amogus

add Baby cha cha gif to first question
This commit is contained in:
Mattia Mascarello 2021-11-20 11:36:07 +01:00 committed by GitHub
commit 5f04fd1e22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 2 deletions

BIN
assets/img/bbchacha.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

View File

@ -38,6 +38,7 @@ body {
left: 0px; left: 0px;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
z-index: 1; /*hide baby*/
} }
#playBegin { #playBegin {
@ -56,7 +57,15 @@ body {
.floatleft { .floatleft {
position: absolute; position: absolute;
left: 2%; left: 2%;
top: 5%; top: 20%;
width: 20%;
display: none;
}
.floatright {
position: absolute;
right: 2%;
bottom: 5%;
width: 20%; width: 20%;
display: none; display: none;

View File

@ -52,6 +52,9 @@
<source src="assets/video/desaprovar.mp4" type="video/mp4"> <source src="assets/video/desaprovar.mp4" type="video/mp4">
</video> </video>
</div> </div>
<div id="bbchacha" class="floatright">
<img src="assets/img/bbchacha.gif">
</div>
<div id="wrong" class="floattop"> <div id="wrong" class="floattop">
<img src="assets/img/wrong.png"> <img src="assets/img/wrong.png">
</div> </div>

View File

@ -51,7 +51,7 @@ function displayQuestion() {
var index = 0; var index = 0;
// sends comrad Dwayne to help (or calls him back) // sends comrad Dwayne to help (or calls him back)
if (total > 4000 ) { if (total > 4000 ) { // comes when low score
$("#rock-approves").hide(); $("#rock-approves").hide();
$("#rock-disapproves").hide(); $("#rock-disapproves").hide();
} }
@ -60,6 +60,12 @@ function displayQuestion() {
$("#rock-approves").show(); $("#rock-approves").show();
} }
// ************************************** // **************************************
// sends comrad baby cha-cha to help (or calls him back)
if ( indexesProgress != 0 ) // comes when first question
$("#bbchacha").hide();
else
$("#bbchacha").show();
// **************************************
if (indexesProgress < indexeslist.length) { if (indexesProgress < indexeslist.length) {
index = indexeslist[indexesProgress]; index = indexeslist[indexesProgress];