change pencile in drawing game
This commit is contained in:
@@ -7,7 +7,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
<section class="bg-white bg-center bg-no-repeat bg-cover h-screen">
|
||||
<div class="container mx-auto px-4">
|
||||
<div class="flex flex-row place-content-between pt-6">
|
||||
<p class="text-5xl text-[#5ac6c8] font-bold select-none">Tick</p>
|
||||
<p class="text-5xl text-[#5ac6c8] font-bold select-none">Cross</p>
|
||||
<img src="/assets/top_logo.png" alt="" draggable="false" class="select-none">
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
@@ -72,7 +72,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
const paramsID = params.get('id');
|
||||
let gameData = null;
|
||||
|
||||
fetch(`https://management.beanstalkedu.com/items/game_tick_variant1/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||
fetch(`https://game-du.teachertrainingkolkata.in/items/game_cross_varient1/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||
.then(res => res.json())
|
||||
.then(data => {
|
||||
gameData = data.data;
|
||||
@@ -99,7 +99,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||
document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
|
||||
document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy;
|
||||
|
||||
const assetsURL = 'https://management.beanstalkedu.com/assets/';
|
||||
const assetsURL = 'https://game-du.teachertrainingkolkata.in/assets/';
|
||||
for (let i = 1; i <= 6; i++) {
|
||||
const imageId = `image${i}`;
|
||||
document.getElementById(imageId).src = assetsURL + gameData[imageId];
|
||||
@@ -112,12 +112,12 @@ import Layout from "../../layouts/Layout.astro";
|
||||
|
||||
if (checkbox.checked) {
|
||||
if (gameData[id.replace('image', 'a')] === true) {
|
||||
element.classList.add('redBorder');
|
||||
} else {
|
||||
element.classList.add('greenBorder');
|
||||
} else {
|
||||
element.classList.add('redBorder');
|
||||
}
|
||||
} else {
|
||||
element.classList.remove('redBorder', 'greenBorder');
|
||||
element.classList.remove('greenBorder', 'redBorder');
|
||||
}
|
||||
}
|
||||
let url = window.location.href;
|
||||
|
||||
Reference in New Issue
Block a user