56 lines
3.9 KiB
HTML
56 lines
3.9 KiB
HTML
<!doctype html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta name="color-scheme" content="light dark">
|
||
<meta name="robots" content="noindex">
|
||
<title>Серийчик в подарок: LihonT</title>
|
||
<link rel="icon" type="image/svg+xml" href="/logo_single_note.svg">
|
||
<style>
|
||
:root { --bg: #fff; --ink: #0d0d0f; --soft: #f4f4f6; --muted: #6b6b73; --tile: #ffe6d8; --inv-bg: #0d0d0f; --inv-ink: #fff; }
|
||
@media (prefers-color-scheme: dark) { :root { --bg: #0d0d0f; --ink: #f5f5f7; --soft: #1c1c20; --muted: #a0a0a8; --tile: #47301f; --inv-bg: #f5f5f7; --inv-ink: #0d0d0f; } }
|
||
* { box-sizing: border-box; }
|
||
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); color: var(--ink); font-family: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
|
||
main { width: min(440px, 100%); text-align: center; display: grid; gap: 16px; justify-items: center; }
|
||
h1 { margin: 0; font-size: clamp(1.9rem, 8vw, 2.6rem); line-height: 1.06; font-weight: 600; letter-spacing: -.03em; }
|
||
p { margin: 0; } .muted { color: var(--muted); }
|
||
img { width: 240px; height: 240px; padding: 14px; object-fit: contain; background: var(--tile); border-radius: 22%; box-shadow: 0 1px 2px rgba(20,20,40,.05), 0 22px 50px rgba(20,20,40,.14); animation: bob 5s ease-in-out infinite; margin-bottom: 10px; }
|
||
@keyframes bob { 50% { transform: translateY(-10px); } }
|
||
@media (prefers-reduced-motion: reduce) { img { animation: none; } }
|
||
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 10px 22px; border-radius: 999px; background: var(--soft); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; transition: transform .15s; }
|
||
.btn--yellow { background: var(--inv-bg); color: var(--inv-ink); }
|
||
.btn:active { transform: scale(.97); }
|
||
[hidden] { display: none !important; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<main>
|
||
<img id="pic" alt="" width="220" height="220" hidden>
|
||
<h1 id="title">Серийчик в подарок</h1>
|
||
<p id="lead" class="muted">Ссылка не подошла: попросите друга прислать её ещё раз.</p>
|
||
<a id="open" class="btn btn--yellow" href="#" hidden>Открыть в LihonT</a>
|
||
<a id="get" class="btn" href="https://git.lihont.space/lihont/LihonT/releases" rel="noopener" hidden>У меня нет LihonT: скачать</a>
|
||
<p id="hint" class="muted" hidden>Нужен TikTok с модом LihonT. Нажмите «Принять» в окошке, и зверь поселится в вашем общем чате.</p>
|
||
</main>
|
||
<script>
|
||
(function () {
|
||
var names = { cat: ["котёнка", "cat"], dog: ["щенка", "dog"], lion: ["львёнка", "lion"] };
|
||
var q = new URLSearchParams(location.search);
|
||
var kind = q.get("kind"), from = q.get("from");
|
||
if (!Object.prototype.hasOwnProperty.call(names, kind) || !/^[0-9]{6,24}$/.test(from || "")) return;
|
||
var pic = document.getElementById("pic");
|
||
pic.src = "/assets/pets/" + kind + ".png"; pic.hidden = false;
|
||
document.getElementById("title").textContent = "Вам дарят " + names[kind][0];
|
||
document.getElementById("lead").textContent = "Он будет жить в вашем общем чате в TikTok и расти вместе с серией.";
|
||
var open = document.getElementById("open");
|
||
open.href = "lihont://pet?kind=" + kind + "&from=" + from;
|
||
open.hidden = false;
|
||
document.getElementById("get").hidden = false;
|
||
document.getElementById("hint").hidden = false;
|
||
if (/Android/i.test(navigator.userAgent)) setTimeout(function () { location.href = open.href; }, 400);
|
||
})();
|
||
</script>
|
||
</body>
|
||
</html>
|