Simple CountDown

Simple CountDown

151K
Simple countdown for your goal. #d-day #dday
Try in your page ! (demo)

paste the url into your Notion page's /embed block.

1. Visit the website. 2. Replace the code below as your target DateTime.
hint) for Months
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul","Aug", "Sep", "Oct", "Nov", "Dec"
3. Copy the whole Source Code (don't paste this into Notion. it won't work yet.) 4. Generate Notion Embedable URL with your Source Code. 5. Paste the URL into your Notion Embed block.
25 comments

Tien

nice! love it!

over 2 years ago

张影

距离转正还剩

over 2 years ago

Evan

If anyone can wtite, please post your html, thank you:)

over 2 years ago

Evan

Did anyone know if the counter goes to zero how can it recalculate from 365days

over 2 years ago

john

It's not simple at all

almost 3 years ago

QwQ

SO hard

almost 3 years ago

Feishigang

Document body{ background-color: white; } #timer { color: #eeeeee; text-align: center; text-transform: uppercase; font-family: 'Lato', sans-serif; font-size: .7em; letter-spacing: 5px; } .days, .hours, .minutes, .seconds { display: inline-block; padding: 20px; width: 100px; border-radius: 5px; } .days { background: #EF2F3C; } .hours { background: #eeeeee; color: #183059; } .minutes { background: #276FBF; } .seconds { background: #F0A202; } .numbers { font-family: 'Montserrat', sans-serif; color: #183059; font-size: 4em; text-align: center; } .white { position: absolute; background: #eeeeee; height: 85px; width: 75px; left: 30%; top: 2%; } .red { position: absolute; background: #EF2F3C; left: 18%; top: 9%; height: 65px; width: 70px; } .blue { position: absolute; background: #276FBF; height: 80px; width: 80px; left: 60%; top: 5%; }

days
hours
minutes
seconds
const year = new Date().getFullYear(); const myDate = new Date('Oct 15, 2024 00:00:00'); console.log(myDate); // countdown let timer = setInterval(function() { // get today's date const today = new Date().getTime(); // get the difference const diff = myDate - today; // math let days = Math.floor(diff / (1000 * 60 * 60 * 24)); let hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); let minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); let seconds = Math.floor((diff % (1000 * 60)) / 1000); // display document.getElementById("days").innerHTML=days document.getElementById("hours").innerHTML=hours document.getElementById("minutes").innerHTML=minutes document.getElementById("seconds").innerHTML=seconds }, 1);

almost 3 years ago

looking for something else?

🖼 Widgets Made
441,818
🔥 Widgets Views Count
62,384,814

28 minutes ago

Apption for Notion - Find & learn Notion friendly embeddable mini apps | Product Hunt Embed