adding the countdown with decent styling

This commit is contained in:
Arjun Patel
2019-01-26 02:34:11 -08:00
parent 7c54bb721d
commit 6e361bfcb9
4 changed files with 300 additions and 4 deletions
+15
View File
@@ -1,4 +1,5 @@
$(document).ready(function() {
// email submission
$('#email-form').submit(function(e) {
e.preventDefault();
@@ -23,4 +24,18 @@ $(document).ready(function() {
}
});
});
// Countdown
$('#countdown').countdown('2019/03/15', function(event) {
$(this).text(event.strftime('%D days %H:%M:%S'));
var $this = $(this).html(
event.strftime(`
<div class="time-factor"><span class="number-text">%w</span><span>weeks</span></div>
<div class="time-factor"><span class="number-text">%d</span><span>days</span></div>
<div class="time-factor"><span class="number-text">%H</span><span>hr</span></div>
<div class="time-factor"><span class="number-text">%M</span><span>min</span></div>
<div class="time-factor right-most"><span class="number-text">%S</span><span>sec</span></div>
`)
);
});
});