Countdown mit richtiger Zeit

This commit is contained in:
Christoph Schindlbeck 2022-08-10 23:46:45 +02:00
parent 699b8002be
commit fc61aa8655
5 changed files with 17 additions and 8 deletions

View File

@ -25,6 +25,9 @@ btnText = "Mehr Infos"
countdownYear = "2022"
countdownMonth = "08"
countdownDay = "18"
countdownHour = "18"
countdownMinute = "0"
countdownSecond = "0"
# News Section
[params.news]

View File

@ -117,7 +117,7 @@
<div class="col-lg-5 col-md-6 col-xs-10 push-xs-1 push-md-0 wow zoomIn">
<div class="block">
<div class="counter text-center">
<ul id="countdown_dashboard" data-year=" 2022" data-month=" 08" data-day=" 18">
<ul id="countdown_dashboard" data-year=" 2022" data-month=" 08" data-day=" 18" data-hour=" 18" data-minute=" 0" data-second=" 0">
<li>
<div class="dash days_dash">
<div class="digit">0</div>

View File

@ -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
});

View File

@ -29,7 +29,7 @@
<div class="col-lg-5 col-md-6 col-xs-10 push-xs-1 push-md-0 wow zoomIn">
<div class="block">
<div class="counter text-center">
<ul id="countdown_dashboard" data-year="{{ with .Site.Params.hero.countdownYear }} {{ . }}{{ end }}" data-month="{{ with .Site.Params.hero.countdownMonth }} {{ . }}{{ end }}" data-day="{{ with .Site.Params.hero.countdownDay }} {{ . }}{{ end }}">
<ul id="countdown_dashboard" data-year="{{ with .Site.Params.hero.countdownYear }} {{ . }}{{ end }}" data-month="{{ with .Site.Params.hero.countdownMonth }} {{ . }}{{ end }}" data-day="{{ with .Site.Params.hero.countdownDay }} {{ . }}{{ end }}" data-hour="{{ with .Site.Params.hero.countdownHour }} {{ . }}{{ end }}" data-minute="{{ with .Site.Params.hero.countdownMinute }} {{ . }}{{ end }}" data-second="{{ with .Site.Params.hero.countdownSecond }} {{ . }}{{ end }}">
<li>
<div class="dash days_dash">
<div class="digit">0</div>

View File

@ -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
});