Untitled
Anonymous
plain_text
02/17/2026 10:23 AM
3.6 KB
10
Indexable
<div id="akcija-banner" style="
display:flex;
justify-content:center;
align-items:center;
background:#000;
color:#fff;
font-family:Arial, sans-serif;
padding:25px 15px;
border-radius:10px;
text-align:center;
flex-direction:column;
transition:color 0.3s, background 0.3s;
">
<div id="akcija-title" style="font-size:20px; font-weight:700; letter-spacing:0.5px; margin-bottom:15px;">
IKI PASIŪLYMO PABAIGOS LIKO
</div>
<div id="timer-boxes" style="display:flex; justify-content:center; gap:6px;">
<div style="background:#111; border:1px solid #333; border-radius:6px; padding:6px 10px; min-width:65px;">
<div id="hours" style="font-size:30px; font-weight:700;">00</div>
<div style="font-size:11px; color:#ccc; margin-top:4px;">VAL.</div>
</div>
<div style="background:#111; border:1px solid #333; border-radius:6px; padding:6px 10px; min-width:65px;">
<div id="minutes" style="font-size:30px; font-weight:700;">00</div>
<div style="font-size:11px; color:#ccc; margin-top:4px;">MIN.</div>
</div>
<div style="background:#111; border:1px solid #333; border-radius:6px; padding:6px 10px; min-width:65px;">
<div id="seconds" style="font-size:30px; font-weight:700;">00</div>
<div style="font-size:11px; color:#ccc; margin-top:4px;">SEK.</div>
</div>
</div>
</div>
<style>
@keyframes flash {
0% { background:#000; color:#fff; }
50% { background:#400; color:#ff5555; }
100% { background:#000; color:#fff; }
}
.flash { animation: flash 1s infinite; }
</style>
<script>
(function () {
// 2026 m. vasario 18 d. 23:59:00
// (pakeisk metus jei reikia)
const target = new Date(2026, 1, 18, 23, 59, 0);
const el = {
h: document.getElementById("hours"),
m: document.getElementById("minutes"),
s: document.getElementById("seconds"),
banner: document.getElementById("akcija-banner"),
title: document.getElementById("akcija-title")
};
function pad(n) { return String(n).padStart(2, "0"); }
function tick() {
const diff = target - new Date();
if (diff > 0) {
const total = Math.floor(diff / 1000);
const h = Math.floor(total / 3600);
const m = Math.floor((total % 3600) / 60);
const s = total % 60;
el.h.textContent = pad(h);
el.m.textContent = pad(m);
el.s.textContent = pad(s);
if (diff < 3 * 3600 * 1000) el.banner.classList.add("flash");
} else {
el.banner.classList.remove("flash");
el.title.textContent = "AKCIJA PASIBAIGĖ";
document.getElementById("timer-boxes").style.display = "none";
clearInterval(timer);
}
}
tick();
const timer = setInterval(tick, 1000);
})();
</script>
Editor is loading...
Leave a Comment