pull/25/head
parent
d9243a1b7c
commit
9ebf6f5d60
|
@ -190,7 +190,7 @@ function submitUserData(drawingZone) {
|
|||
'userId' : userId,
|
||||
'gameTime' : timeDifferenceInSeconds,
|
||||
'score' : scoreTotal,
|
||||
'star' : starValue
|
||||
'gameStar' : starValue
|
||||
};
|
||||
console.log(userData);
|
||||
fetch(`https://api.teachertrainingkolkata.in/api/saveGameScore`, {
|
||||
|
@ -208,6 +208,7 @@ function submitUserData(drawingZone) {
|
|||
loadingDiv.style.display = 'none';
|
||||
starContainer.style.display = 'flex';
|
||||
starContainer.style.flexDirection = 'row';
|
||||
document.getElementById('wsSavedImg').classList.remove('-z-10');
|
||||
document.getElementById('starFeedbackMessage').innerHTML = feedbackMessage;
|
||||
for (let i = 0; i < starValue; i++) {
|
||||
const starDiv = document.createElement('div');
|
||||
|
|
|
@ -254,7 +254,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
// console.log(userData);
|
||||
progressIncrement();
|
||||
|
|
|
@ -288,7 +288,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
// console.log(userData);
|
||||
progressIncrement();
|
||||
|
|
|
@ -256,7 +256,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
progressIncrement();
|
||||
addStarScalingStyles();
|
||||
|
|
|
@ -275,7 +275,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
progressIncrement();
|
||||
addStarScalingStyles();
|
||||
|
|
|
@ -226,7 +226,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
progressIncrement();
|
||||
addStarScalingStyles();
|
||||
|
|
|
@ -18,11 +18,11 @@ import Layout from '../../layouts/Layout.astro';
|
|||
</div>
|
||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||
<button class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||
<button class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
<button onclick="retryGame();" class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clip-art-container absolute bottom-0 right-0">
|
||||
<div id="wsSavedImg" class="clip-art-container -z-10 absolute bottom-0 right-0">
|
||||
<img src="/assets/svg/clip-art2.svg" alt="Clip Art" class="clip-art">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -23,11 +23,11 @@ const numberOfTimes = starNumberOfTime;
|
|||
</div>
|
||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||
<button onclick="" class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||
<button class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
<button onclick="retryGame();" class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clip-art-container absolute bottom-0 right-0">
|
||||
<div id="wsSavedImg" class="clip-art-container -z-10 absolute bottom-0 right-0">
|
||||
<img src="/assets/svg/clip-art2.svg" alt="Clip Art" class="clip-art">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -587,7 +587,7 @@ const numberOfTimes = starNumberOfTime;
|
|||
|
||||
|
||||
</script>
|
||||
<style href="https://fonts.googleapis.com/css?family=Quicksand&display=swap" rel="stylesheet" >
|
||||
<style href="https://fonts.googleapis.com/css?family=Quicksand&display=swap" rel="stylesheet">
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
|
|
@ -19,11 +19,11 @@ import Layout from '../../layouts/Layout.astro';
|
|||
</div>
|
||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||
<button class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||
<button class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
<button onclick="retryGame();" class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clip-art-container absolute bottom-0 right-0">
|
||||
<div id="wsSavedImg" class="clip-art-container -z-10 absolute bottom-0 right-0">
|
||||
<img src="/assets/svg/clip-art2.svg" alt="Clip Art" class="clip-art">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -19,11 +19,11 @@ import Layout from '../../layouts/Layout.astro';
|
|||
</div>
|
||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||
<button class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||
<button class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
<button onclick="retryGame();" class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clip-art-container absolute bottom-0 right-0">
|
||||
<div id="wsSavedImg" class="clip-art-container -z-10 absolute bottom-0 right-0">
|
||||
<img src="/assets/svg/clip-art2.svg" alt="Clip Art" class="clip-art">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -19,11 +19,11 @@ import Layout from '../../layouts/Layout.astro';
|
|||
</div>
|
||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||
<button class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||
<button class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
<button onclick="retryGame();" class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clip-art-container absolute bottom-0 right-0">
|
||||
<div id="wsSavedImg" class="clip-art-container -z-10 absolute bottom-0 right-0">
|
||||
<img src="/assets/svg/clip-art2.svg" alt="Clip Art" class="clip-art">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,11 +18,11 @@ import Layout from '../../layouts/Layout.astro';
|
|||
</div>
|
||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||
<button class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||
<button class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
<button onclick="retryGame();" class="border-[1px] border-[#0348A8] p-2.5 rounded-[4px] text-[#0348A8] w-full">Try Again</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clip-art-container absolute bottom-0 right-0">
|
||||
<div id="wsSavedImg" class="clip-art-container absolute -z-10 bottom-0 right-0">
|
||||
<img src="/assets/svg/clip-art2.svg" alt="Clip Art" class="clip-art">
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -265,7 +265,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
// console.log(userData);
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
|
||||
};
|
||||
// console.log(userData);
|
||||
|
|
|
@ -219,7 +219,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
// console.log(userData);
|
||||
progressIncrement();
|
||||
|
|
|
@ -261,7 +261,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
// console.log(userData);let progress = 0;
|
||||
progressIncrement();
|
||||
|
|
|
@ -302,7 +302,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
// console.log(userData);
|
||||
progressIncrement();
|
||||
|
|
|
@ -230,7 +230,7 @@ import Layout from "../../layouts/Layout.astro";
|
|||
'userId': userId,
|
||||
'gameTime': timeDifferenceInSeconds,
|
||||
'score': totalPoints,
|
||||
'star': starValue
|
||||
'gameStar': starValue
|
||||
};
|
||||
// console.log(userData);
|
||||
progressIncrement();
|
||||
|
|
Loading…
Reference in New Issue