forked from Fresh-Teacher/NPJS-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexes.html
100 lines (92 loc) · 4.17 KB
/
indexes.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Website Maintenance</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<style>
.modal-message {
color: red;
}
.center-button {
text-align: center;
}
/* Animation for the Buy New Domain button */
@keyframes shake {
0%, 100% {
transform: translateX(0);
}
50% {
transform: translateX(-10px);
}
}
.shake-effect {
animation: shake 0.5s ease-in-out infinite;
}
</style>
</head>
<body>
<!-- Your modal HTML structure -->
<div class="modal" id="maintenanceModal" tabindex="-1" role="dialog" aria-labelledby="maintenanceModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header text-center">
<h5 class="modal-title w-100" id="maintenanceModalLabel">SHUTDOWN NOTICE</h5>
</div>
<div class="modal-body">
<p id="countdown" class="modal-message">Initializing...</p>
<!-- Animated "Buy New Domain" button with an icon -->
<div class="center-button">
<button type="button" class="btn btn-success shake-effect" id="buyNewDomainBtn">
<span>👉</span> Buy New Domain
</button>
</div>
</div>
<div class="modal-footer justify-content-center">
<!-- "Ok, I understand" button -->
<button type="button" class="btn btn-primary" data-dismiss="modal">Ok, I understand.</button>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const countdownEndDate = new Date('2023-12-13T00:00:00Z').getTime();
function updateCountdown() {
const now = new Date().getTime();
const timeDifference = countdownEndDate - now;
if (timeDifference > 0) {
const hours = Math.floor((timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
// Change the message and add a line break
document.getElementById('countdown').innerHTML = `This website is currently hosted on a temporary link, and it will be deleted in the next 24 hours.<br>If you are the developer, we recommend purchasing a domain name to avoid losing your content and ensure uninterrupted access for your users.<br>The website will be deleted in <span class="modal-message">${hours} Hours, ${minutes} Minutes, and ${seconds} Seconds.</span>`;
} else {
// Change the message when the time ends
const deletedMessage = document.createElement('p');
deletedMessage.className = 'modal-message';
deletedMessage.innerHTML = 'This website has been deleted from our temporary link. Please purchase a domain name to ensure uninterrupted access for your users.';
document.getElementById('countdown').replaceWith(deletedMessage);
// Remove the "Ok, I understand" button
document.querySelector('.modal-footer').remove();
}
}
updateCountdown();
setInterval(updateCountdown, 1000);
$('#maintenanceModal').modal({
backdrop: 'static',
keyboard: false
});
// Add click event for animated "Buy New Domain" button
document.getElementById('buyNewDomainBtn').addEventListener('click', function () {
// Replace 'YOUR_DOMAIN_REGISTRAR_URL' with the actual URL of the domain registrar
window.location.href = 'https://www.godaddy.com/';
});
});
</script>
</body>
</html>