Event countdown
The general version of the Tết Countdown: instead of being fixed to the first day of the month, you can set any date via data-ngay-den. The widget knows three states, counting down, the day itself, and passed, so it doesn't just count down to zero and then sit there.
Try it right here, then grab the code
<div data-widget="dem-nguoc" data-lang="en"></div> <script async src="https://nhatnguyet.org/embed/w.js"></script>
What's inside this widget
- Two required attributes: the target date and the event name. If either is missing, the widget says exactly which one is missing rather than showing made-up numbers.
- After the event date passes, the widget switches to a line saying it has already taken place rather than removing itself from the page.
- Days are counted in Vietnam time, so everyone viewing on the same day sees the same number.
How to use it
Adjustable attributes
| Attribute | Value | Meaning |
|---|---|---|
| data-widget | required | Widget code, taken from the embed code block of each widget |
| data-theme | light, dark or auto | Defaults to light. auto follows the light or dark setting of the reader's device |
| data-accent | #b5402f | Accent color as a 6-character hex value, to match your brand identity |
| data-lang | vi, en or zh | Defaults to vi |
| data-size | compact, standard or wide | Level of detail by frame width: compact drops secondary details, wide spreads out. Default is standard |
| data-ngay-den | 2027-03-15 | Target date for the event countdown widget, in year-month-day format. Required for that widget |
| data-ten-su-kien | Opening of branch 2 | Name shown next to the countdown, up to 60 characters. Required for the event countdown widget |
A few things to note first
- Free to use, unlimited impressions, no account required.
- Please keep the small attribution line at the bottom of the widget intact, don't cover it or shrink it to the point of being unreadable.
- Please do not embed on gambling, adult content, scam, or anything illegal under Vietnamese law.
Want to look it over before pasting it on your real site? There's a working example page you can open directly in your browser, along with documentation in Vietnamese and English, all at GitHub repository for this widget.
Nội dung này có giúp được anh chị không?
You may also need
#DemNguocSuKien #WidgetDemNguoc
