pull/25/head
Suvodip 2024-10-14 11:15:56 +05:30
parent d9243a1b7c
commit 9ebf6f5d60
18 changed files with 26 additions and 25 deletions

View File

@ -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');

View File

@ -254,7 +254,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
// console.log(userData);
progressIncrement();

View File

@ -288,7 +288,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
// console.log(userData);
progressIncrement();

View File

@ -256,7 +256,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
progressIncrement();
addStarScalingStyles();

View File

@ -275,7 +275,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
progressIncrement();
addStarScalingStyles();

View File

@ -226,7 +226,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
progressIncrement();
addStarScalingStyles();

View File

@ -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>

View File

@ -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;

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -265,7 +265,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
// console.log(userData);

View File

@ -293,7 +293,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
// console.log(userData);

View File

@ -219,7 +219,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
// console.log(userData);
progressIncrement();

View File

@ -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();

View File

@ -302,7 +302,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
// console.log(userData);
progressIncrement();

View File

@ -230,7 +230,7 @@ import Layout from "../../layouts/Layout.astro";
'userId': userId,
'gameTime': timeDifferenceInSeconds,
'score': totalPoints,
'star': starValue
'gameStar': starValue
};
// console.log(userData);
progressIncrement();