countdowngen/README.md
2025-08-12 22:28:56 -03:00

1.3 KiB
Raw Permalink Blame History

Countdown Generator (Flask + Jinja)

A tiny two-page app:

  • / a setup form to pick the target date/time and styles.
  • /countdown?… the shareable countdown page, configured entirely from query params.

Quick start

python3 -m venv .venv
source .venv/bin/activate
pip install flask
python app.py
# open http://127.0.0.1:5000/

URL Parameters

  • target — ISO-8601 local datetime (e.g. 2025-09-06T12:00)
  • title — heading text
  • schemedark or light
  • accent — CSS color (e.g. #ff6b6b or hsl(260 90% 60%))
  • fg / bg — text/background colors
  • radius — number (px) for rounded corners
  • shadownone|sm|md|lg
  • font — CSS font-family string
  • millis1 to show milliseconds
  • rounded_unitnone|minutes|hours|days (rounds to nearest)

Example

/countdown?title=Ignacio%27s%20Trip&target=2025-09-06T12:00&scheme=dark&accent=%238b5cf6&radius=20&shadow=lg&font=system-ui&millis=1

Notes

  • The generator reflects any params back into the form, so you can tweak and re-generate links.
  • No external assets required. Everything is pure HTML/CSS/JS with Flask+Jinja.
  • The countdown runs with requestAnimationFrame and updates at ~60Hz (with ms on if enabled).
  • If no target is provided, /countdown redirects to /.