change star budies in drawing game #43
|
@ -23,9 +23,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row" style="margin-top: 15px; margin-bottom: 15px;">
|
<div class="flex flex-row items-center" style="">
|
||||||
<img class="z-10" src="/assets/animate-clipart.gif" alt="" style="width: 90.21px; height: 86.24px;" />
|
<img id="starClipart" class="z-10" src="" alt="" style="width: 170px;" />
|
||||||
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-6 rounded-[10px] -ml-[10px]" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-8 rounded-[10px] -ml-[40px] h-fit" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||||
<button onclick="history.back();" 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 onclick="history.back();" class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||||
|
@ -83,6 +83,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
const imgElement = document.getElementById('clipArtWithHand');
|
const imgElement = document.getElementById('clipArtWithHand');
|
||||||
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
||||||
if (imgElement) {
|
if (imgElement) {
|
||||||
|
document.getElementById('starClipart').src = `/assets/${spriteNames}.gif`
|
||||||
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
||||||
console.log(imgElement.src)
|
console.log(imgElement.src)
|
||||||
} else {
|
} else {
|
||||||
|
@ -133,7 +134,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
}
|
}
|
||||||
function showAnimation() {
|
function showAnimation() {
|
||||||
const clipArt = document.querySelector('.clip-art');
|
const clipArt = document.querySelector('.clip-art');
|
||||||
clipArt.classList.add('show');
|
setTimeout(() => {
|
||||||
|
clipArt.classList.add('show');
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
||||||
const isTab = window.innerWidth > 768 && window.innerWidth <= 1416;
|
const isTab = window.innerWidth > 768 && window.innerWidth <= 1416;
|
||||||
|
|
|
@ -23,9 +23,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row" style="margin-top: 15px; margin-bottom: 15px;">
|
<div class="flex flex-row items-center" style="">
|
||||||
<img class="z-10" src="/assets/animate-clipart.gif" alt="" style="width: 90.21px; height: 86.24px;" />
|
<img id="starClipart" class="z-10" src="" alt="" style="width: 170px;" />
|
||||||
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-6 rounded-[10px] -ml-[10px]" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-8 rounded-[10px] -ml-[40px] h-fit" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||||
<button onclick="history.back();" 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 onclick="history.back();" class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||||
|
@ -82,6 +82,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
const imgElement = document.getElementById('clipArtWithHand');
|
const imgElement = document.getElementById('clipArtWithHand');
|
||||||
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
||||||
if (imgElement) {
|
if (imgElement) {
|
||||||
|
document.getElementById('starClipart').src = `/assets/${spriteNames}.gif`
|
||||||
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
||||||
console.log(imgElement.src)
|
console.log(imgElement.src)
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,7 +132,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
}
|
}
|
||||||
function showAnimation() {
|
function showAnimation() {
|
||||||
const clipArt = document.querySelector('.clip-art');
|
const clipArt = document.querySelector('.clip-art');
|
||||||
clipArt.classList.add('show');
|
setTimeout(() => {
|
||||||
|
clipArt.classList.add('show');
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
||||||
const isTab = window.innerWidth > 768 && window.innerWidth <= 1416;
|
const isTab = window.innerWidth > 768 && window.innerWidth <= 1416;
|
||||||
|
|
|
@ -23,9 +23,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row" style="margin-top: 15px; margin-bottom: 15px;">
|
<div class="flex flex-row items-center" style="">
|
||||||
<img class="z-10" src="/assets/animate-clipart.gif" alt="" style="width: 90.21px; height: 86.24px;" />
|
<img id="starClipart" class="z-10" src="" alt="" style="width: 170px;" />
|
||||||
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-6 rounded-[10px] -ml-[10px]" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-8 rounded-[10px] -ml-[40px] h-fit" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||||
<button onclick="history.back();" 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 onclick="history.back();" class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||||
|
@ -76,14 +76,16 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
const akademyUserId = params.get('childId');
|
const akademyUserId = params.get('childId');
|
||||||
const akademyGameName = params.get('gameName');
|
const akademyGameName = params.get('gameName');
|
||||||
const spriteNames = params.get('spriteName');
|
const spriteNames = params.get('spriteName');
|
||||||
let buddiesList = [ "arlo", "ava", "dax", "kai", "monstero", "yara" ]
|
let buddiesList = [ "arlo", "ava", "dax", "kai", "monstero", "yara" ];
|
||||||
|
// starClipart
|
||||||
function displaySprite() {
|
function displaySprite() {
|
||||||
if (buddiesList.includes(spriteNames)) {
|
if (buddiesList.includes(spriteNames)) {
|
||||||
const imgElement = document.getElementById('clipArtWithHand');
|
const imgElement = document.getElementById('clipArtWithHand');
|
||||||
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
||||||
if (imgElement) {
|
if (imgElement) {
|
||||||
|
document.getElementById('starClipart').src = `/assets/${spriteNames}.gif`
|
||||||
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
||||||
console.log(imgElement.src)
|
// console.log(imgElement.src)
|
||||||
} else {
|
} else {
|
||||||
console.log('Element with ID "clipArtWithHand" not found.');
|
console.log('Element with ID "clipArtWithHand" not found.');
|
||||||
}
|
}
|
||||||
|
@ -146,11 +148,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
}
|
}
|
||||||
function showAnimation() {
|
function showAnimation() {
|
||||||
const clipArt = document.querySelector('.clip-art');
|
const clipArt = document.querySelector('.clip-art');
|
||||||
|
|
||||||
// Initially set the clip-art to show after 2 seconds with a slide effect
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
clipArt.classList.add('show'); // Add the show class to trigger animation
|
clipArt.classList.add('show');
|
||||||
}, 2000); // Delay animation by 2 seconds
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
||||||
|
|
|
@ -23,9 +23,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row" style="margin-top: 15px; margin-bottom: 15px;">
|
<div class="flex flex-row items-center" style="">
|
||||||
<img class="z-10" src="/assets/animate-clipart.gif" alt="" style="width: 90.21px; height: 86.24px;" />
|
<img id="starClipart" class="z-10" src="" alt="" style="width: 170px;" />
|
||||||
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-6 rounded-[10px] -ml-[10px]" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-8 rounded-[10px] -ml-[40px] h-fit" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||||
<button onclick="history.back();" 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 onclick="history.back();" class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||||
|
@ -82,6 +82,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
const imgElement = document.getElementById('clipArtWithHand');
|
const imgElement = document.getElementById('clipArtWithHand');
|
||||||
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
||||||
if (imgElement) {
|
if (imgElement) {
|
||||||
|
document.getElementById('starClipart').src = `/assets/${spriteNames}.gif`
|
||||||
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
||||||
console.log(imgElement.src)
|
console.log(imgElement.src)
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,7 +132,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
}
|
}
|
||||||
function showAnimation() {
|
function showAnimation() {
|
||||||
const clipArt = document.querySelector('.clip-art');
|
const clipArt = document.querySelector('.clip-art');
|
||||||
clipArt.classList.add('show');
|
setTimeout(() => {
|
||||||
|
clipArt.classList.add('show');
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
||||||
const isTab = window.innerWidth > 768 && window.innerWidth <= 1416;
|
const isTab = window.innerWidth > 768 && window.innerWidth <= 1416;
|
||||||
|
|
|
@ -23,9 +23,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
<p id="get-star-value" class="absolute inset-0 flex items-center justify-center text-[#E76408] text-[40px] font-[900]"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-row" style="margin-top: 15px; margin-bottom: 15px;">
|
<div class="flex flex-row items-center" style="">
|
||||||
<img class="z-10" src="/assets/animate-clipart.gif" alt="" style="width: 90.21px; height: 86.24px;" />
|
<img id="starClipart" class="z-10" src="" alt="" style="width: 170px;" />
|
||||||
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-6 rounded-[10px] -ml-[10px]" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
<p id="starFeedbackMessage" class="text-[#0348A8] text-[12px] font-[700] p-8 rounded-[10px] -ml-[40px] h-fit" style="background: linear-gradient(270.05deg, #FFFFFF 4.67%, #DAEAFF 99.61%);"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
<div class="flex flex-col w-full max-w-sm items-center justify-center mx-auto gap-3">
|
||||||
<button onclick="history.back();" 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 onclick="history.back();" class="rounded-[4px] bg-[#0348A8] text-[#FFF] text-[12px] font-[700] p-2.5 w-full border-[1px] border-[#0348A8]">Wow, Lets Go</button>
|
||||||
|
@ -82,6 +82,7 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
const imgElement = document.getElementById('clipArtWithHand');
|
const imgElement = document.getElementById('clipArtWithHand');
|
||||||
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
document.getElementById('buddiesName').textContent = `Ask to ${spriteNames.charAt(0).toUpperCase() + spriteNames.slice(1)}`;
|
||||||
if (imgElement) {
|
if (imgElement) {
|
||||||
|
document.getElementById('starClipart').src = `/assets/${spriteNames}.gif`
|
||||||
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
imgElement.src = `/assets/hand-${spriteNames}.svg`;
|
||||||
console.log(imgElement.src)
|
console.log(imgElement.src)
|
||||||
} else {
|
} else {
|
||||||
|
@ -131,7 +132,9 @@ import Layout from '../../layouts/Layout.astro';
|
||||||
}
|
}
|
||||||
function showAnimation() {
|
function showAnimation() {
|
||||||
const clipArt = document.querySelector('.clip-art');
|
const clipArt = document.querySelector('.clip-art');
|
||||||
clipArt.classList.add('show');
|
setTimeout(() => {
|
||||||
|
clipArt.classList.add('show');
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
const isMobile = window.innerWidth <= 768; // Define your mobile breakpoint as needed
|
||||||
const isTab = window.innerWidth > 768 && window.innerWidth <= 1416;
|
const isTab = window.innerWidth > 768 && window.innerWidth <= 1416;
|
||||||
|
|
Loading…
Reference in New Issue