-
Notifications
You must be signed in to change notification settings - Fork 2
/
script.js
84 lines (67 loc) · 2.66 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/**
* @author Vinit Shahdeo <vinitshahdeo@gmail.com>
*/
(function ($) {
"use strict";
$('.sakura-falling').sakura();
})(jQuery);
$(document).on('click', function(){
document.getElementById("my_audio").play();
console.log('Kalyanathinu varane');
});
// Set the date we're counting down to
var countDownDate = new Date("April 24, 2021 12:30:00").getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get todays date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Output the result in an element with id="demo"
document.getElementById("time").innerHTML = "<div class='container'><div class='days block'>"+ days + "<br>Days</div>" + "<div class='hours block'>" + hours + "<br>Hours</div>" + "<div class='minutes block'>" + minutes + "<br>Minutes</div>" + "<div class='seconds block'>" + seconds + "<br>Seconds</div></div>";
// If the count down is over, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("time").innerHTML = "Bless the married couple for happy life!";
}
}, 1000);
// being a bit cool :p
var styles = [
'background: linear-gradient(#D33106, #571402)'
, 'border: 4px solid #3E0E02'
, 'color: white'
, 'display: block'
, 'text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3)'
, 'box-shadow: 0 2px 0 rgba(255, 255, 255, 0.4) inset, 0 5px 3px -5px rgba(0, 0, 0, 0.5), 0 -13px 5px -10px rgba(255, 255, 255, 0.4) inset'
, 'line-height: 40px'
, 'text-align: center'
, 'font-weight: bold'
, 'font-size: 32px'
].join(';');
var styles1 = [
'color: #FF6C37'
, 'display: block'
, 'text-shadow: 0 2px 0 rgba(0, 0, 0, 1)'
, 'line-height: 40px'
, 'font-weight: bold'
, 'font-size: 32px'
].join(';');
var styles2 = [
'color: teal'
, 'display: block'
, 'text-shadow: 0 2px 0 rgba(0, 0, 0, 1)'
, 'line-height: 40px'
, 'font-weight: bold'
, 'font-size: 32px'
].join(';');
console.log('\n\n%c SAVE THE DATE: 24th Apr, 2021!', styles);
console.log('%cYour presence is requested!%c\n\nRegards: Arun Gopinath', styles1, styles2);
console.log(
`%cKalyanathinu varane!\n\n`,
'color: yellow; background:tomato; font-size: 24pt; font-weight: bold',
)