forked from DevinNorgarb/mcdeez
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
137 lines (126 loc) · 3.77 KB
/
index.html
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<style>
img {
margin-top: -20px;
width: 100%;
display: block;
}
.top-right-day {
position: absolute;
top: 51%;
left: 71%;
transform: translate(-50%, -50%);
text-align: center;
color: white;
font-weight: bold;
font-size: 75px;
color: white;
font-weight: 900;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.top-right-mon {
position: absolute;
top: 59%;
left: 71%;
transform: translate(-50%, -50%);
text-align: center;
color: white;
font-weight: bold;
color: white;
font-weight: 600;
font-size: 40px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.timer {
text-align: center;
margin-top: 5px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.timer-text {
text-align: center;
font-weight: normal;
color: #6C6C6C;
}
.flex {
display: flex;
flex-direction: row;
justify-content: center;
}
#time {
color: #505050;
font-weight: normal;
font-size: 19px;
margin-top: 5px;
margin-left: 10px;
}
.image {
width: 110%;
height: auto;
margin-left: -20px;
text-align: center;
position: relative;
}
</style>
<body>
<script id="__bs_script__">
//<![CDATA[
document.write("<script async src='http://HOST:3000/browser-sync/browser-sync-client.js?v=2.26.0'><\/script>".replace(
"HOST", location.hostname));
//]]>
</script>
<div class="container">
<div class="image">
<img height="" width="" src="./resixed-perfect.png" alt="">
<div id="day" class="top-right-day">23</div>
<div id="mon" class="top-right-mon">DEC</div>
</div>
<div class="timer">
<div class="timer-text"> This offer expires in </div>
<div class="flex timer-text">
<span class="timer-text">
<i class="far fa-clock fa-2x" aria-hidden="true"></i>
</span>
<div id="time">
</div>
</div>
</div>
</div>
</body>
</html>
<script defer src="https://use.fontawesome.com/releases/v5.6.3/js/all.js" integrity="sha384-EIHISlAOj4zgYieurP0SdoiBYfGJKkgWedPHH4jCzpCXLmzVsw1ouK59MuUtP4a1"
crossorigin="anonymous"></script>
<script>
let today = new Date()
var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October",
"November", "December"
];
var formattedMonth = months[today.getMonth()].substr(0, 3)
document.getElementById('day').innerHTML = today.getDate();
document.getElementById('mon').innerHTML = formattedMonth.toLocaleUpperCase();
function startTimer(duration, display) {
var timer = duration,
minutes, seconds;
setInterval(function () {
minutes = parseInt(timer / 60, 10)
seconds = parseInt(timer % 60, 10);
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;
display.textContent = minutes + ":" + seconds;
if (--timer < 0) {
timer = duration;
}
}, 1000);
}
window.onload = function () {
var fiveMinutes = 60 * 5,
display = document.querySelector('#time');
startTimer(fiveMinutes, display);
};
</script>