From fc61aa865513e76c599154b71967665f8d3809aa Mon Sep 17 00:00:00 2001 From: Christoph Schindlbeck Date: Wed, 10 Aug 2022 23:46:45 +0200 Subject: [PATCH] Countdown mit richtiger Zeit --- config.toml | 3 +++ public/index.html | 2 +- public/js/main.js | 9 ++++++--- themes/infinity-hugo/layouts/partials/hero-area.html | 2 +- themes/infinity-hugo/static/js/main.js | 9 ++++++--- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/config.toml b/config.toml index 97f692a..440b6cc 100644 --- a/config.toml +++ b/config.toml @@ -25,6 +25,9 @@ btnText = "Mehr Infos" countdownYear = "2022" countdownMonth = "08" countdownDay = "18" +countdownHour = "18" +countdownMinute = "0" +countdownSecond = "0" # News Section [params.news] diff --git a/public/index.html b/public/index.html index ac7316f..f41cdfc 100644 --- a/public/index.html +++ b/public/index.html @@ -117,7 +117,7 @@
-
    +
    • 0
      diff --git a/public/js/main.js b/public/js/main.js index e5dd8b2..c575071 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -30,14 +30,17 @@ $(document).ready(function(){ $year = $('#countdown_dashboard').data('year'); $month = $('#countdown_dashboard').data('month'); $day = $('#countdown_dashboard').data('day'); + $hour = $('#countdown_dashboard').data('hour'); + $minute = $('#countdown_dashboard').data('minute'); + $second = $('#countdown_dashboard').data('second'); $('#countdown_dashboard').countDown({ targetDate: { 'day': $day, 'month': $month, 'year': $year, - 'hour': 23, - 'min': 59, - 'sec': 59, + 'hour': $hour, + 'min': $minute, + 'sec': $second, }, omitWeeks: true }); diff --git a/themes/infinity-hugo/layouts/partials/hero-area.html b/themes/infinity-hugo/layouts/partials/hero-area.html index 36bc469..f8c0648 100644 --- a/themes/infinity-hugo/layouts/partials/hero-area.html +++ b/themes/infinity-hugo/layouts/partials/hero-area.html @@ -29,7 +29,7 @@
      -
        +
        • 0
          diff --git a/themes/infinity-hugo/static/js/main.js b/themes/infinity-hugo/static/js/main.js index e5dd8b2..c575071 100644 --- a/themes/infinity-hugo/static/js/main.js +++ b/themes/infinity-hugo/static/js/main.js @@ -30,14 +30,17 @@ $(document).ready(function(){ $year = $('#countdown_dashboard').data('year'); $month = $('#countdown_dashboard').data('month'); $day = $('#countdown_dashboard').data('day'); + $hour = $('#countdown_dashboard').data('hour'); + $minute = $('#countdown_dashboard').data('minute'); + $second = $('#countdown_dashboard').data('second'); $('#countdown_dashboard').countDown({ targetDate: { 'day': $day, 'month': $month, 'year': $year, - 'hour': 23, - 'min': 59, - 'sec': 59, + 'hour': $hour, + 'min': $minute, + 'sec': $second, }, omitWeeks: true });