pull/2/head
parent
1992331b96
commit
9fc5095718
|
@ -145,7 +145,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
var assetsList = {}
|
var assetsList = {}
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const paramsID = params.get('id');
|
const paramsID = params.get('id');
|
||||||
const data = fetch(`https://management.beanstalkedu.com/items/game_drag/${encodeURIComponent(paramsID)}`)
|
const data = fetch(`https://game-du.teachertrainingkolkata.in/items/game_drag/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(({data}) => {
|
.then(({data}) => {
|
||||||
const {left_image1, left_image2, left_image3, left_image4, right_image1, right_image2, right_image3, right_image4} = data;
|
const {left_image1, left_image2, left_image3, left_image4, right_image1, right_image2, right_image3, right_image4} = data;
|
||||||
|
@ -154,7 +154,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
} else{
|
} else{
|
||||||
imageCustomWidth = "?width=100";
|
imageCustomWidth = "?width=100";
|
||||||
}
|
}
|
||||||
const assetsURL = "https://management.beanstalkedu.com/assets/"
|
const assetsURL = "https://game-du.teachertrainingkolkata.in/assets/"
|
||||||
assetsList.left_image1 = assetsURL + left_image1 + imageCustomWidth;
|
assetsList.left_image1 = assetsURL + left_image1 + imageCustomWidth;
|
||||||
assetsList.left_image2 = assetsURL + left_image2 + imageCustomWidth;
|
assetsList.left_image2 = assetsURL + left_image2 + imageCustomWidth;
|
||||||
assetsList.left_image3 = assetsURL + left_image3 + imageCustomWidth;
|
assetsList.left_image3 = assetsURL + left_image3 + imageCustomWidth;
|
||||||
|
@ -290,7 +290,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
create() {
|
create() {
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const paramsID = params.get('id');
|
const paramsID = params.get('id');
|
||||||
fetch(`https://management.beanstalkedu.com/items/game_drag/${encodeURIComponent(paramsID)}`)
|
fetch(`https://game-du.teachertrainingkolkata.in/items/game_drag/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
|
|
|
@ -61,7 +61,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
|
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const paramsID = params.get('id');
|
const paramsID = params.get('id');
|
||||||
const data = fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing/${encodeURIComponent(paramsID)}`)
|
const data = fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(({data}) => {
|
.then(({data}) => {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
|
@ -112,7 +112,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
function create() {
|
function create() {
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const paramsID = params.get('id');
|
const paramsID = params.get('id');
|
||||||
fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing/${encodeURIComponent(paramsID)}`)
|
fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
// console.log(data.colors)
|
// console.log(data.colors)
|
||||||
|
|
|
@ -74,7 +74,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
|
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const paramsID = params.get('id');
|
const paramsID = params.get('id');
|
||||||
const data = fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing_v2/${encodeURIComponent(paramsID)}`)
|
const data = fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing_v2/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(({data}) => {
|
.then(({data}) => {
|
||||||
colorList = data.colors;
|
colorList = data.colors;
|
||||||
|
@ -129,7 +129,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
function create() {
|
function create() {
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const paramsID = params.get('id');
|
const paramsID = params.get('id');
|
||||||
fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing_v2/${encodeURIComponent(paramsID)}`)
|
fetch(`https://game-du.teachertrainingkolkata.in/items/game_drawing_v2/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
// console.log(data.colors)
|
// console.log(data.colors)
|
||||||
|
@ -319,7 +319,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
// Create the Eraser button
|
// Create the Eraser button
|
||||||
const eraserButton = document.createElement('button');
|
const eraserButton = document.createElement('button');
|
||||||
// eraserButton.textContent = 'Eraser';
|
// eraserButton.textContent = 'Eraser';
|
||||||
eraserButton.innerHTML = '<i class="fa fa-eraser" style="font-size:30px"> </i>';
|
eraserButton.innerHTML = '<i class="fa fa-eraser" style="font-size:30px"></i>';
|
||||||
eraserButton.style.color = 'blue';
|
eraserButton.style.color = 'blue';
|
||||||
eraserButton.style.width = 'fit-content';
|
eraserButton.style.width = 'fit-content';
|
||||||
eraserButton.style.marginRight = '15px';
|
eraserButton.style.marginRight = '15px';
|
||||||
|
|
|
@ -72,7 +72,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||||
const paramsID = params.get('id');
|
const paramsID = params.get('id');
|
||||||
let gameData = null;
|
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_tick_variant1/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
gameData = data.data;
|
gameData = data.data;
|
||||||
|
@ -99,7 +99,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||||
document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
|
document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
|
||||||
document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy;
|
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++) {
|
for (let i = 1; i <= 6; i++) {
|
||||||
const imageId = `image${i}`;
|
const imageId = `image${i}`;
|
||||||
document.getElementById(imageId).src = assetsURL + gameData[imageId];
|
document.getElementById(imageId).src = assetsURL + gameData[imageId];
|
||||||
|
|
|
@ -89,7 +89,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const paramsID = params.get('id');
|
const paramsID = params.get('id');
|
||||||
|
|
||||||
fetch(`https://management.beanstalkedu.com/items/game_tick_variant2/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
fetch(`https://game-du.teachertrainingkolkata.in/items/game_tick_variant2/${encodeURIComponent(paramsID)}?filter[status][_eq]=published`)
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
gameData = data.data;
|
gameData = data.data;
|
||||||
|
@ -124,7 +124,7 @@ import Layout from "../../layouts/Layout.astro";
|
||||||
}
|
}
|
||||||
document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
|
document.getElementById('LearningArea').innerHTML = gameData.LearningArea;
|
||||||
document.getElementById('LearningSubArea_copy').innerHTML = gameData.LearningSubArea_copy;
|
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 <= 9; i++) {
|
for (let i = 1; i <= 9; i++) {
|
||||||
const imageId = `image${i}`;
|
const imageId = `image${i}`;
|
||||||
document.getElementById(imageId).src = assetsURL + gameData[imageId];
|
document.getElementById(imageId).src = assetsURL + gameData[imageId];
|
||||||
|
|
Loading…
Reference in New Issue