Update index.html
Browse files- index.html +100 -18
index.html
CHANGED
|
@@ -1,19 +1,101 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ru">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Coming Soon – Countdown</title>
|
| 6 |
+
<style>
|
| 7 |
+
html, body{height:100%;margin:0;font-family:"Courier New", Courier, monospace;}
|
| 8 |
+
.bgimg{
|
| 9 |
+
background: url('/w3images/forestbridge.jpg') center/cover no-repeat;
|
| 10 |
+
height:100%;position:relative;color:#fff;
|
| 11 |
+
font-size:25px;
|
| 12 |
+
}
|
| 13 |
+
.topleft, .bottomleft{
|
| 14 |
+
position:absolute;left:16px;color:#fff;
|
| 15 |
+
}
|
| 16 |
+
.topleft{top:0;}
|
| 17 |
+
.bottomleft{bottom:0;}
|
| 18 |
+
.middle{
|
| 19 |
+
position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
|
| 20 |
+
text-align:center;
|
| 21 |
+
}
|
| 22 |
+
hr{margin:auto;width:40%;}
|
| 23 |
+
|
| 24 |
+
.typing-cursor::after{
|
| 25 |
+
content:"|";
|
| 26 |
+
animation:blink 1s steps(2) infinite;
|
| 27 |
+
}
|
| 28 |
+
@keyframes blink{
|
| 29 |
+
50%{opacity:0;}
|
| 30 |
+
}
|
| 31 |
+
</style>
|
| 32 |
+
</head>
|
| 33 |
+
|
| 34 |
+
<body>
|
| 35 |
+
<div class="bgimg" class="top-container">
|
| 36 |
+
<div class="topleft"><p>Logo</p></div>
|
| 37 |
+
|
| 38 |
+
<div class="middle">
|
| 39 |
+
<h1 id="it" class="typing-cursor"></h1>
|
| 40 |
+
<hr>
|
| 41 |
+
<p id="demo" class="typing-cursor"></p>
|
| 42 |
+
</div>
|
| 43 |
+
|
| 44 |
+
<div class="bottomleft"><p id="about" class="typing-cursor"></p></div>
|
| 45 |
+
</div>
|
| 46 |
+
<script>
|
| 47 |
+
function typeTextInto(elem, txt, speed = 50, onComplete) {
|
| 48 |
+
let i = 0;
|
| 49 |
+
elem.innerHTML = '';
|
| 50 |
+
|
| 51 |
+
function type() {
|
| 52 |
+
if (i < txt.length) {
|
| 53 |
+
elem.innerHTML += txt.charAt(i);
|
| 54 |
+
i++;
|
| 55 |
+
setTimeout(type, speed);
|
| 56 |
+
} else if (typeof onComplete === 'function') {
|
| 57 |
+
onComplete();
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
type();
|
| 61 |
+
}
|
| 62 |
+
const targetDate = new Date('Feb 14, 2026 09:59:00').getTime();
|
| 63 |
+
const demoEl = document.getElementById('demo');
|
| 64 |
+
let timerInt;
|
| 65 |
+
|
| 66 |
+
function getTimeString() {
|
| 67 |
+
const now = Date.now();
|
| 68 |
+
const diff = targetDate - now;
|
| 69 |
+
|
| 70 |
+
if (diff <= 0) return 'ВЫШЛО';
|
| 71 |
+
|
| 72 |
+
const d = Math.floor(diff / (1000 * 60 * 60 * 24));
|
| 73 |
+
const h = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
| 74 |
+
const m = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
|
| 75 |
+
const s = Math.floor((diff % (1000 * 60)) / 1000);
|
| 76 |
+
|
| 77 |
+
return `${d}d ${h}h ${m}m ${s}s`;
|
| 78 |
+
}
|
| 79 |
+
function startTimer() {
|
| 80 |
+
timerInt = setInterval(() => {
|
| 81 |
+
demoEl.innerHTML = getTimeString();
|
| 82 |
+
}, 1000);
|
| 83 |
+
}
|
| 84 |
+
function typeCountdownOnce() {
|
| 85 |
+
const first = getTimeString();
|
| 86 |
+
typeTextInto(demoEl, first, 70, () => {
|
| 87 |
+
demoEl.classList.remove('typing-cursor');
|
| 88 |
+
startTimer();
|
| 89 |
+
});
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 93 |
+
typeTextInto(document.getElementById('it'), 'COMING SOON', 50);
|
| 94 |
+
typeTextInto(document.getElementById('about'), 'Some text', 30);
|
| 95 |
+
typeCountdownOnce();
|
| 96 |
+
});
|
| 97 |
+
</script>
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
</body>
|
| 101 |
</html>
|