dev
This commit is contained in:
parent
b8346d5913
commit
5b1e7bc7cd
1 changed files with 18 additions and 16 deletions
34
index.html
34
index.html
|
|
@ -27,16 +27,16 @@
|
|||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 2.5rem;
|
||||
padding: 2.5rem 3rem;
|
||||
border-radius: 1rem;
|
||||
padding: 1rem 1rem;
|
||||
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
|
||||
max-width: 700px;
|
||||
width: 100%;
|
||||
/* width: 100%; */
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 1.8rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
color: #b3ccff;
|
||||
letter-spacing: -0.02em;
|
||||
|
|
@ -47,18 +47,18 @@
|
|||
|
||||
.timer {
|
||||
font-family: 'Fira Mono', 'JetBrains Mono', 'Courier New', monospace;
|
||||
font-size: 4.2rem;
|
||||
font-size: 2rem;
|
||||
font-weight: 600;
|
||||
color: #ffffff;
|
||||
line-height: 1.2;
|
||||
background: rgba(0, 0, 0, 0.35);
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 2rem;
|
||||
border-radius: 1rem;
|
||||
display: inline-block;
|
||||
border: 1px solid rgba(255, 215, 100, 0.3);
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
|
||||
letter-spacing: 2px;
|
||||
margin: 1rem 0 1.5rem 0;
|
||||
/* margin: 1rem 0 1.5rem 0; */
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
|
||||
|
|
@ -103,8 +103,8 @@
|
|||
|
||||
@media (max-width: 500px) {
|
||||
.card { padding: 1.8rem; }
|
||||
.description { font-size: 1.4rem; }
|
||||
.timer { font-size: 2.8rem; }
|
||||
.description { font-size: 1rem; }
|
||||
.timer { font-size: 2rem; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
@ -117,16 +117,17 @@
|
|||
<div id="timer" class="timer">-- д. --:--</div>
|
||||
|
||||
<!-- Информационная панель (всегда видна) -->
|
||||
<div class="note">
|
||||
<div class="example">
|
||||
🔧 <strong>Параметры URL</strong>: <code>?datetime=2025-12-31T23:59:59&description=Нового%20года</code><br>
|
||||
<span style="opacity:0.8;">⏱️ Обновление каждые 60 секунд</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="note"> -->
|
||||
<!-- <div class="example"> -->
|
||||
<!-- 🔧 <strong>Параметры URL</strong>: <code>?datetime=2025-12-31T23:59:59&description=Нового%20года</code><br> -->
|
||||
<!-- <span style="opacity:0.8;">⏱️ Обновление каждые 60 секунд</span> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
console.debug('page loaded'); // DEBUG
|
||||
// --- Чтение параметров из строки запроса ---
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
let datetimeRaw = urlParams.get('datetime');
|
||||
|
|
@ -162,6 +163,7 @@
|
|||
function refreshTimer() {
|
||||
if (!isValidTarget) {
|
||||
// Случай невалидной даты обрабатывается один раз ниже
|
||||
console.error(`Не правильная дата`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +200,7 @@
|
|||
console.error('Таймер: передан невалидный datetime =', datetimeRaw);
|
||||
} else {
|
||||
// Формируем строку описания
|
||||
let descriptionText = `До ${descriptionRaw} осталось`;
|
||||
let descriptionText = `${descriptionRaw}`;
|
||||
if (isDemoDate || isDemoDesc) {
|
||||
// Если хотя бы один параметр был подставлен автоматически, добавляем метку (демо)
|
||||
// Но чтобы не загромождать, покажем в скобках, если не было параметра description
|
||||
|
|
|
|||
Loading…
Reference in a new issue