From 49823fd9c22097a1a31d265bd2bf1d952ec6e039 Mon Sep 17 00:00:00 2001 From: sleeping Date: Fri, 1 Mar 2024 19:00:04 +0400 Subject: [PATCH] roadmap: fix countdown --- .../layouts/shortcodes/roadmap.html | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/themes/hugo-bulma-blocks-theme/layouts/shortcodes/roadmap.html b/themes/hugo-bulma-blocks-theme/layouts/shortcodes/roadmap.html index 4310f1b83..b7626a62b 100644 --- a/themes/hugo-bulma-blocks-theme/layouts/shortcodes/roadmap.html +++ b/themes/hugo-bulma-blocks-theme/layouts/shortcodes/roadmap.html @@ -216,8 +216,13 @@

Development Version

var timeinterval = setInterval(updateClock, 1000); } - var deadline = new Date(Date.parse(new Date()) + 15 * 24 * 60 * 60 * 1000); - initializeClock('point-release', deadline); - initializeClock('freeze', deadline); - initializeClock('package', deadline); - \ No newline at end of file + {{ with index .Site.Data.conf }} + const nextFreezeDate = new Date({{ .nextfreezedate }}); + const nextReleaseDate = new Date({{ .nextreleasedate }}); + const nextPointReleaseDate = new Date({{ .nextpointreleasedate }}); + {{ end }} + + initializeClock('point-release', nextPointReleaseDate); + initializeClock('freeze', nextFreezeDate); + initializeClock('package', nextReleaseDate); +