Spaces:
Running
Running
File size: 1,246 Bytes
9a66798 aad8d56 9a66798 aad8d56 9a66798 aad8d56 9a66798 aad8d56 9a66798 aad8d56 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | // floating hearts
setInterval(()=>{
let heart=document.createElement("div")
heart.className="heart"
heart.innerHTML="❤️"
heart.style.left=Math.random()*100+"vw"
heart.style.fontSize=(10+Math.random()*30)+"px"
document.body.appendChild(heart)
setTimeout(()=>heart.remove(),6000)
},300)
// python typewriter animation
let code = `# Love Program
girl = "Esther"
boy = "Adedeji"
months = 6
for m in range(months):
print("Thank you for every beautiful moment ❤️")
print("Happy 6 Months My Love 💕")
`
let i=0
function type(){
if(i < code.length){
document.getElementById("code").innerHTML += code.charAt(i)
i++
setTimeout(type,40)
}
}
type()
// slideshow
let images=["esther.png","adedeji.png"]
let index=0
setInterval(()=>{
index=(index+1)%images.length
document.getElementById("slide").src=images[index]
},3000)
// countdown
let target=new Date("Oct 26, 2026 00:00:00")
setInterval(()=>{
let now=new Date()
let diff=target-now
let days=Math.floor(diff/(1000*60*60*24))
let hours=Math.floor((diff%(1000*60*60*24))/(1000*60*60))
let mins=Math.floor((diff%(1000*60*60))/(1000*60))
let sec=Math.floor((diff%(1000*60))/1000)
document.getElementById("countdown").innerHTML =
days+"d "+hours+"h "+mins+"m "+sec+"s"
},1000) |