fix sub learning area key issue (copy)

pull/28/head
Suvodip 2024-11-19 12:32:05 +05:30
parent b8444a361a
commit 7e44149a4a
15 changed files with 70 additions and 70 deletions

View File

@ -1,4 +1,4 @@
const jsonData = [ const jsonData = [
{ {
"src": "/assets/back.jpeg", "src": "/assets/back.jpeg",
"title": "Image Title 1", "title": "Image Title 1",
@ -19,27 +19,27 @@ const jsonData = [
"title": "Image Title 4", "title": "Image Title 4",
"description": "Description for image 4 goes here." "description": "Description for image 4 goes here."
} }
]; ];
let currentSlide = 0; let currentSlide = 0;
function updateSlide(jsonData){ function updateSlide(){
const slide = jsonData[currentSlide]; const slide = jsonData[currentSlide];
document.getElementById('slideImage').src = slide.src; document.getElementById('slideImage').src = slide.src;
document.getElementById('imageTitle').textContent = slide.title; document.getElementById('imageTitle').textContent = slide.title;
document.getElementById('imageDescription').textContent = slide.description; document.getElementById('imageDescription').textContent = slide.description;
} }
document.getElementById('nextButton').addEventListener('click', () => { document.getElementById('nextButton').addEventListener('click', () => {
currentSlide = (currentSlide + 1) % jsonData.length; currentSlide = (currentSlide + 1) % jsonData.length;
console.log(currentSlide) console.log(currentSlide)
updateSlide(); updateSlide();
}) })
document.getElementById('prevButton').addEventListener('click', () => { document.getElementById('prevButton').addEventListener('click', () => {
currentSlide = (currentSlide - 1 + jsonData.length) % jsonData.length; currentSlide = (currentSlide - 1 + jsonData.length) % jsonData.length;
updateSlide(); updateSlide();
}) })
updateSlide(); updateSlide();
let parentMainContainer = document.getElementById('parentMainContainer'); let parentMainContainer = document.getElementById('parentMainContainer');
let gallerySliderId = document.getElementById('gallerySliderId'); let gallerySliderId = document.getElementById('gallerySliderId');
function closeGallery(){ function closeGallery(){
gallerySliderId.classList.add('hidden'); gallerySliderId.classList.add('hidden');
} }

View File

@ -6,7 +6,7 @@ const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString); const urlParams = new URLSearchParams(queryString);
const userId = urlParams.get('userId'); const userId = urlParams.get('userId');
const gameVersion = urlParams.get('gameName'); const gameVersion = urlParams.get('gameName');
let gameId; const gameId = urlParams.get('id');
let submitNotic; let submitNotic;
console.log(userId); console.log(userId);

View File

@ -22,7 +22,7 @@ import Layout from "../../layouts/Layout.astro";
<div class="container mx-auto px-4"> <div class="container mx-auto px-4">
<!-- <div class="flex flex-col"> <!-- <div class="flex flex-col">
<p id="LearningArea"></p> <p id="LearningArea"></p>
<p id="LearningSubArea_copy"></p> <p id="LearningSubArea"></p>
</div> --> </div> -->
<p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p> <p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p>
<form id="contactForm"> <form id="contactForm">
@ -143,7 +143,7 @@ import Layout from "../../layouts/Layout.astro";
document.getElementById("label6").innerHTML = gameData.label6; document.getElementById("label6").innerHTML = gameData.label6;
} }
// document.getElementById('LearningArea').innerHTML = gameData.LearningArea; // document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
// document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy; // document.getElementById('LearningSubArea').innerHTML = gameData.LearningSubArea;
const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/'; const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/';
for (let i = 1; i <= 6; i++) { for (let i = 1; i <= 6; i++) {
@ -430,7 +430,7 @@ import Layout from "../../layouts/Layout.astro";
color: #7C4C23; color: #7C4C23;
padding-top: 10px; padding-top: 10px;
} }
#LearningArea, #LearningSubArea_copy{ #LearningArea, #LearningSubArea{
font-size: 20px; font-size: 20px;
color: #7C4C23; color: #7C4C23;
font-weight: bold; font-weight: bold;

View File

@ -22,7 +22,7 @@ import Layout from "../../layouts/Layout.astro";
<div class="container mx-auto px-4"> <div class="container mx-auto px-4">
<!-- <div class="flex flex-col"> <!-- <div class="flex flex-col">
<p id="LearningArea"></p> <p id="LearningArea"></p>
<p id="LearningSubArea_copy"></p> <p id="LearningSubArea"></p>
</div> --> </div> -->
<p class="sm:text-2xl md:text-3xl lg:text-3xl text-center font-[600] text-[#60C6CB] my-2 select-none" id="gameDescription"></p> <p class="sm:text-2xl md:text-3xl lg:text-3xl text-center font-[600] text-[#60C6CB] my-2 select-none" id="gameDescription"></p>
<form id="contactForm"> <form id="contactForm">
@ -169,7 +169,7 @@ import Layout from "../../layouts/Layout.astro";
document.getElementById("label9").innerHTML = gameData.label9; document.getElementById("label9").innerHTML = gameData.label9;
} }
// document.getElementById('LearningArea').innerHTML = gameData.LearningArea; // document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
// document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy; // document.getElementById('LearningSubArea').innerHTML = gameData.LearningSubArea;
const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/'; const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/';
for (let i = 1; i <= 9; i++) { for (let i = 1; i <= 9; i++) {
const imageId = `image${i}`; const imageId = `image${i}`;
@ -464,7 +464,7 @@ import Layout from "../../layouts/Layout.astro";
color: #7C4C23; color: #7C4C23;
padding-top: 10px; padding-top: 10px;
} }
#LearningArea, #LearningSubArea_copy{ #LearningArea, #LearningSubArea{
font-size: 20px; font-size: 20px;
color: #7C4C23; color: #7C4C23;
font-weight: bold; font-weight: bold;

View File

@ -22,7 +22,7 @@ import Layout from "../../layouts/Layout.astro";
<div class="container mx-auto px-4"> <div class="container mx-auto px-4">
<!-- <div class="flex flex-col"> <!-- <div class="flex flex-col">
<p id="LearningArea"></p> <p id="LearningArea"></p>
<p id="LearningSubArea_copy"></p> <p id="LearningSubArea"></p>
</div> --> </div> -->
<p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p> <p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p>
<form id="contactForm"> <form id="contactForm">
@ -144,7 +144,7 @@ import Layout from "../../layouts/Layout.astro";
document.getElementById("label6").innerHTML = gameData.label6; document.getElementById("label6").innerHTML = gameData.label6;
} }
// document.getElementById('LearningArea').innerHTML = gameData.LearningArea; // document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
// document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy; // document.getElementById('LearningSubArea').innerHTML = gameData.LearningSubArea;
const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/'; const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/';
for (let i = 1; i <= 6; i++) { for (let i = 1; i <= 6; i++) {
@ -431,7 +431,7 @@ import Layout from "../../layouts/Layout.astro";
color: #7C4C23; color: #7C4C23;
padding-top: 10px; padding-top: 10px;
} }
#LearningArea, #LearningSubArea_copy{ #LearningArea, #LearningSubArea{
font-size: 20px; font-size: 20px;
color: #7C4C23; color: #7C4C23;
font-weight: bold; font-weight: bold;

View File

@ -451,7 +451,7 @@ import Layout from "../../layouts/Layout.astro";
color: #7C4C23; color: #7C4C23;
padding-top: 10px; padding-top: 10px;
} }
#LearningArea, #LearningSubArea_copy{ #LearningArea, #LearningSubArea{
font-size: 20px; font-size: 20px;
color: #7C4C23; color: #7C4C23;
font-weight: bold; font-weight: bold;

View File

@ -340,7 +340,7 @@ const numberOfTimes = starNumberOfTime;
}, },
]; ];
// this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23);
// this.add.text(displayW / 14 - 15, 70, data.LearningSubArea_copy, {font: `19px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 70, data.LearningSubArea, {font: `19px`}).setTint(0x7c4c23);
// Left Image Name // Left Image Name
this.add.text(displayW / 14 - 15, 240, data.left_image1_name).setTint(0x7c4c23); this.add.text(displayW / 14 - 15, 240, data.left_image1_name).setTint(0x7c4c23);
this.add.text(displayW / 14 - 15, 409, data.left_image2_name).setTint(0x7c4c23); this.add.text(displayW / 14 - 15, 409, data.left_image2_name).setTint(0x7c4c23);

View File

@ -327,7 +327,7 @@ import Layout from '../../layouts/Layout.astro';
const responsiveFontSize = (window.innerWidth / textSizeScale) * baseFontSize; const responsiveFontSize = (window.innerWidth / textSizeScale) * baseFontSize;
const descrptText = this.add.text(screenCenterX, 85, data.description, { font: `${responsiveFontSize}px quicksand`, fill: '#60C6CB', align: "center", wordWrap: {width: window.innerWidth-wrapWidth}}, ).setOrigin(0.5); const descrptText = this.add.text(screenCenterX, 85, data.description, { font: `${responsiveFontSize}px quicksand`, fill: '#60C6CB', align: "center", wordWrap: {width: window.innerWidth-wrapWidth}}, ).setOrigin(0.5);
// this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23);
// this.add.text(displayW / 14 - 15, 70, data.LearningSubArea_copy, {font: `19px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 70, data.LearningSubArea, {font: `19px`}).setTint(0x7c4c23);
// Left Image Name // Left Image Name
this.add.text(displayW / 14 - 15, 240, data.left_image1_name).setTint(0x7c4c23); this.add.text(displayW / 14 - 15, 240, data.left_image1_name).setTint(0x7c4c23);
this.add.text(displayW / 14 - 15, 409, data.left_image2_name).setTint(0x7c4c23); this.add.text(displayW / 14 - 15, 409, data.left_image2_name).setTint(0x7c4c23);

View File

@ -365,7 +365,7 @@ import Layout from '../../layouts/Layout.astro';
fill: '#7c4c23', fill: '#7c4c23',
}).setOrigin(0.5); }).setOrigin(0.5);
// this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23);
// this.add.text(displayW / 14 - 15, 70, data.LearningSubArea_copy, {font: `19px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 70, data.LearningSubArea, {font: `19px`}).setTint(0x7c4c23);
// Left Image Name // Left Image Name
this.add.text(leftTargetZoneW - 45, 240, data.left_image1_name).setTint(0x7c4c23); this.add.text(leftTargetZoneW - 45, 240, data.left_image1_name).setTint(0x7c4c23);
this.add.text(leftTargetZoneW - 45, 409, data.left_image2_name).setTint(0x7c4c23); this.add.text(leftTargetZoneW - 45, 409, data.left_image2_name).setTint(0x7c4c23);

View File

@ -327,7 +327,7 @@ import Layout from '../../layouts/Layout.astro';
const responsiveFontSize = (window.innerWidth / textSizeScale) * baseFontSize; const responsiveFontSize = (window.innerWidth / textSizeScale) * baseFontSize;
const descrptText = this.add.text(screenCenterX, 110, data.description, { font: `${responsiveFontSize}px quicksand`, fill: '#60C6CB', align: "center", wordWrap: {width: window.innerWidth-wrapWidth}}, ).setOrigin(0.5); const descrptText = this.add.text(screenCenterX, 110, data.description, { font: `${responsiveFontSize}px quicksand`, fill: '#60C6CB', align: "center", wordWrap: {width: window.innerWidth-wrapWidth}}, ).setOrigin(0.5);
// this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23);
// this.add.text(displayW / 14 - 15, 70, data.LearningSubArea_copy, {font: `19px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 70, data.LearningSubArea, {font: `19px`}).setTint(0x7c4c23);
// Left Image Name // Left Image Name
this.add.text(displayW / 14 - 15, 240, data.left_image1_name).setTint(0x7c4c23); this.add.text(displayW / 14 - 15, 240, data.left_image1_name).setTint(0x7c4c23);
this.add.text(displayW / 14 - 15, 409, data.left_image2_name).setTint(0x7c4c23); this.add.text(displayW / 14 - 15, 409, data.left_image2_name).setTint(0x7c4c23);

View File

@ -309,7 +309,7 @@ import Layout from '../../layouts/Layout.astro';
fill: '#7c4c23', fill: '#7c4c23',
}).setOrigin(0.5); }).setOrigin(0.5);
// this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 50, data.LearningArea, {font: `20px`}).setTint(0x7c4c23);
// this.add.text(displayW / 14 - 15, 70, data.LearningSubArea_copy, {font: `19px`}).setTint(0x7c4c23); // this.add.text(displayW / 14 - 15, 70, data.LearningSubArea, {font: `19px`}).setTint(0x7c4c23);
// Left Image Name // Left Image Name
this.add.text(displayW / 14 - 15, 240, data.left_image1_name).setTint(0x7c4c23); this.add.text(displayW / 14 - 15, 240, data.left_image1_name).setTint(0x7c4c23);
this.add.text(displayW / 14 - 15, 409, data.left_image2_name).setTint(0x7c4c23); this.add.text(displayW / 14 - 15, 409, data.left_image2_name).setTint(0x7c4c23);

View File

@ -22,7 +22,7 @@ import Layout from "../../layouts/Layout.astro";
<div class="container mx-auto px-4"> <div class="container mx-auto px-4">
<!-- <div class="flex flex-col"> <!-- <div class="flex flex-col">
<p id="LearningArea"></p> <p id="LearningArea"></p>
<p id="LearningSubArea_copy"></p> <p id="LearningSubArea"></p>
</div> --> </div> -->
<p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p> <p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p>
<form id="contactForm"> <form id="contactForm">
@ -194,7 +194,7 @@ import Layout from "../../layouts/Layout.astro";
document.getElementById("label6").innerHTML = gameData.label6; document.getElementById("label6").innerHTML = gameData.label6;
} }
// document.getElementById('LearningArea').innerHTML = gameData.LearningArea; // document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
// document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy; // document.getElementById('LearningSubArea').innerHTML = gameData.LearningSubArea;
const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/'; const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/';
for (let i = 1; i <= 6; i++) { for (let i = 1; i <= 6; i++) {
@ -408,7 +408,7 @@ import Layout from "../../layouts/Layout.astro";
color: #7C4C23; color: #7C4C23;
padding-top: 10px; padding-top: 10px;
} }
#LearningArea, #LearningSubArea_copy{ #LearningArea, #LearningSubArea{
font-size: 20px; font-size: 20px;
color: #7C4C23; color: #7C4C23;
font-weight: bold; font-weight: bold;

View File

@ -22,7 +22,7 @@ import Layout from "../../layouts/Layout.astro";
<div class="container mx-auto px-4"> <div class="container mx-auto px-4">
<!-- <div class="flex flex-col"> <!-- <div class="flex flex-col">
<p id="LearningArea"></p> <p id="LearningArea"></p>
<p id="LearningSubArea_copy"></p> <p id="LearningSubArea"></p>
</div> --> </div> -->
<p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p> <p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p>
<form id="contactForm" class="flex flex-col justify-center"> <form id="contactForm" class="flex flex-col justify-center">
@ -226,7 +226,7 @@ import Layout from "../../layouts/Layout.astro";
document.getElementById("label9").innerHTML = gameData.label9; document.getElementById("label9").innerHTML = gameData.label9;
} }
// document.getElementById('LearningArea').innerHTML = gameData.LearningArea; // document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
// document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy; // document.getElementById('LearningSubArea').innerHTML = gameData.LearningSubArea;
const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/'; const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/';
for (let i = 1; i <= 9; i++) { for (let i = 1; i <= 9; i++) {
const imageId = `image${i}`; const imageId = `image${i}`;
@ -435,7 +435,7 @@ import Layout from "../../layouts/Layout.astro";
color: #7C4C23; color: #7C4C23;
padding-top: 10px; padding-top: 10px;
} }
#LearningArea, #LearningSubArea_copy{ #LearningArea, #LearningSubArea{
font-size: 20px; font-size: 20px;
color: #7C4C23; color: #7C4C23;
font-weight: bold; font-weight: bold;

View File

@ -152,7 +152,7 @@ import Layout from "../../layouts/Layout.astro";
document.getElementById("label6").innerHTML = gameData.label6; document.getElementById("label6").innerHTML = gameData.label6;
} }
// document.getElementById('LearningArea').innerHTML = gameData.LearningArea; // document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
// document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy; // document.getElementById('LearningSubArea').innerHTML = gameData.LearningSubArea;
const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/'; const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/';
for (let i = 1; i <= 6; i++) { for (let i = 1; i <= 6; i++) {
@ -396,7 +396,7 @@ import Layout from "../../layouts/Layout.astro";
color: #7C4C23; color: #7C4C23;
padding-top: 10px; padding-top: 10px;
} }
#LearningArea, #LearningSubArea_copy{ #LearningArea, #LearningSubArea{
font-size: 20px; font-size: 20px;
color: #7C4C23; color: #7C4C23;
font-weight: bold; font-weight: bold;

View File

@ -22,7 +22,7 @@ import Layout from "../../layouts/Layout.astro";
<div class="container mx-auto px-4"> <div class="container mx-auto px-4">
<!-- <div class="flex flex-col"> <!-- <div class="flex flex-col">
<p id="LearningArea"></p> <p id="LearningArea"></p>
<p id="LearningSubArea_copy"></p> <p id="LearningSubArea"></p>
</div> --> </div> -->
<p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p> <p class="sm:text-2xl md:text-3xl lg:text-4xl text-center font-[600] text-[#60C6CB] my-4 select-none" id="gameDescription"></p>
<form id="contactForm" class="flex flex-col justify-center"> <form id="contactForm" class="flex flex-col justify-center">
@ -223,7 +223,7 @@ import Layout from "../../layouts/Layout.astro";
document.getElementById("label9").innerHTML = gameData.label9; document.getElementById("label9").innerHTML = gameData.label9;
} }
// document.getElementById('LearningArea').innerHTML = gameData.LearningArea; // document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
// document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy; // document.getElementById('LearningSubArea').innerHTML = gameData.LearningSubArea;
const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/'; const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/';
for (let i = 1; i <= 9; i++) { for (let i = 1; i <= 9; i++) {
const imageId = `image${i}`; const imageId = `image${i}`;
@ -437,7 +437,7 @@ import Layout from "../../layouts/Layout.astro";
color: #7C4C23; color: #7C4C23;
padding-top: 10px; padding-top: 10px;
} }
#LearningArea, #LearningSubArea_copy{ #LearningArea, #LearningSubArea{
font-size: 20px; font-size: 20px;
color: #7C4C23; color: #7C4C23;
font-weight: bold; font-weight: bold;