frontend: admin panel SPA and public site pages
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
073c4fb9f0
commit
23bb0da6c0
3 changed files with 1125 additions and 0 deletions
137
site/cabinet.html
Normal file
137
site/cabinet.html
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Личный кабинет — MBS Panel</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg: #0a0b0f; --card: #131519; --border: #1e2128;
|
||||
--text: #eceef2; --muted: #868c99; --accent: #7c6cf0;
|
||||
--ease: cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
body {
|
||||
margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
display: flex; align-items: center; justify-content: center; padding: 24px;
|
||||
}
|
||||
.card {
|
||||
max-width: 420px; width: 100%; background: var(--card); border: 1px solid var(--border);
|
||||
border-radius: 16px; padding: 32px 28px;
|
||||
opacity: 0; transform: translateY(10px); filter: blur(6px);
|
||||
animation: enter 0.6s var(--ease) forwards;
|
||||
}
|
||||
@keyframes enter { to { opacity: 1; transform: translateY(0); filter: blur(0); } }
|
||||
h1 { font-size: 17px; margin: 0 0 20px; font-weight: 600; letter-spacing: -0.01em; }
|
||||
.row { display: flex; gap: 8px; margin-bottom: 4px; }
|
||||
input {
|
||||
flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
|
||||
padding: 11px 13px; color: var(--text); font-size: 14px;
|
||||
transition: border-color 0.2s var(--ease);
|
||||
}
|
||||
input:focus { outline: none; border-color: var(--accent); }
|
||||
.btn {
|
||||
padding: 11px 16px; border-radius: 8px; border: none; cursor: pointer;
|
||||
background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
|
||||
transition: transform 0.15s var(--ease), opacity 0.15s var(--ease);
|
||||
}
|
||||
.btn:hover { opacity: 0.85; }
|
||||
.btn:active { transform: scale(0.96); }
|
||||
|
||||
.sub-item {
|
||||
background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
|
||||
padding: 13px 15px; margin-top: 12px; font-size: 14px;
|
||||
opacity: 0; transform: translateY(8px);
|
||||
animation: enter 0.5s var(--ease) forwards;
|
||||
}
|
||||
.sub-item .top { display: flex; justify-content: space-between; margin-bottom: 4px; }
|
||||
.sub-item .days { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.muted { color: var(--muted); font-size: 13px; }
|
||||
.linkbox {
|
||||
background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
|
||||
font-size: 12px; word-break: break-all; color: var(--muted); margin-top: 16px;
|
||||
opacity: 0; animation: fadeIn 0.5s var(--ease) 0.15s forwards;
|
||||
}
|
||||
@keyframes fadeIn { to { opacity: 1; } }
|
||||
.hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; margin-bottom: 0; }
|
||||
a.tglink { color: var(--accent); text-decoration: none; }
|
||||
a.tglink:hover { text-decoration: underline; }
|
||||
#err { color: #e5686b; font-size: 13px; margin-top: 8px; min-height: 0; }
|
||||
.qr-box {
|
||||
display: flex; justify-content: center; margin-top: 16px;
|
||||
opacity: 0; animation: fadeIn 0.5s var(--ease) 0.2s forwards;
|
||||
}
|
||||
.qr-box img, .qr-box canvas { border-radius: 8px; background: #fff; padding: 6px; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
|
||||
.card, .sub-item, .linkbox, .qr-box { opacity: 1 !important; transform: none !important; filter: none !important; }
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="card">
|
||||
<h1>Личный кабинет</h1>
|
||||
<div class="row">
|
||||
<input id="tokenInput" placeholder="вставь свой токен" autocomplete="off">
|
||||
<button class="btn" onclick="load()">Войти</button>
|
||||
</div>
|
||||
<div id="err"></div>
|
||||
<div id="content"></div>
|
||||
<p class="hint">Токен выдаёт бот <a class="tglink" href="https://t.me/YourBot_robot" target="_blank">@YourBot_robot</a> — «Моя подписка»</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const API = "https://sub.example.com";
|
||||
|
||||
function esc(s) {
|
||||
if (s === null || s === undefined) return "";
|
||||
return String(s).replace(/[&<>"']/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c]));
|
||||
}
|
||||
|
||||
function fillFromUrl() {
|
||||
const params = new URLSearchParams(location.search);
|
||||
const t = params.get("token");
|
||||
if (t) { document.getElementById("tokenInput").value = t; load(); }
|
||||
}
|
||||
|
||||
async function load() {
|
||||
const token = document.getElementById("tokenInput").value.trim();
|
||||
const err = document.getElementById("err");
|
||||
const content = document.getElementById("content");
|
||||
err.textContent = ""; content.innerHTML = "";
|
||||
if (!token) return;
|
||||
try {
|
||||
const res = await fetch(`${API}/api/cabinet/${encodeURIComponent(token)}`);
|
||||
if (!res.ok) { err.textContent = "Токен не найден"; return; }
|
||||
const data = await res.json();
|
||||
history.replaceState(null, "", `?token=${encodeURIComponent(token)}`);
|
||||
let html = "";
|
||||
if (data.subscriptions.length === 0) {
|
||||
html += `<p class="muted" style="margin-top:14px">Активных подписок нет</p>`;
|
||||
} else {
|
||||
data.subscriptions.forEach((s, i) => {
|
||||
html += `<div class="sub-item" style="animation-delay:${i * 0.06}s"><div class="top"><span>${esc(s.node)}</span><span class="days">${s.days_left} дн.</span></div><div class="muted">${esc(s.plan_label)}, до ${s.expires_at.slice(0,10)}</div></div>`;
|
||||
});
|
||||
}
|
||||
html += `<div class="qr-box" id="qr"></div>`;
|
||||
html += `<div class="linkbox">${esc(data.sub_link)}</div>`;
|
||||
content.innerHTML = html;
|
||||
if (data.sub_link) {
|
||||
new QRCode(document.getElementById("qr"), {
|
||||
text: data.sub_link, width: 150, height: 150,
|
||||
colorDark: "#0a0b0f", colorLight: "#ffffff", correctLevel: QRCode.CorrectLevel.M,
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
err.textContent = "Ошибка соединения";
|
||||
}
|
||||
}
|
||||
|
||||
fillFromUrl();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
200
site/index.html
Normal file
200
site/index.html
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MBS Panel</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg: #0a0b0f; --card: #131519; --border: #1e2128;
|
||||
--text: #eceef2; --muted: #868c99; --accent: #7c6cf0;
|
||||
--ease: cubic-bezier(0.16, 1, 0.3, 1);
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html { scroll-behavior: smooth; }
|
||||
body {
|
||||
margin: 0; background: var(--bg); color: var(--text);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
a { color: inherit; }
|
||||
.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
|
||||
|
||||
header {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 28px 0;
|
||||
}
|
||||
.logo { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
|
||||
nav { display: flex; gap: 28px; }
|
||||
nav a {
|
||||
position: relative; text-decoration: none; color: var(--muted); font-size: 14px;
|
||||
transition: color 0.25s var(--ease);
|
||||
}
|
||||
nav a::after {
|
||||
content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px;
|
||||
background: currentColor; transform: scaleX(0); transform-origin: left;
|
||||
transition: transform 0.3s var(--ease);
|
||||
}
|
||||
nav a:hover { color: var(--text); }
|
||||
nav a:hover::after { transform: scaleX(1); }
|
||||
|
||||
.btn {
|
||||
display: inline-block; padding: 13px 24px; border-radius: 10px;
|
||||
background: var(--text); color: var(--bg);
|
||||
text-decoration: none; font-weight: 600; font-size: 14px; border: none; cursor: pointer;
|
||||
transition: transform 0.15s var(--ease), opacity 0.15s var(--ease);
|
||||
}
|
||||
.btn:hover { opacity: 0.85; }
|
||||
.btn:active { transform: scale(0.97); }
|
||||
.btn.ghost {
|
||||
background: transparent; color: var(--text); border: 1px solid var(--border);
|
||||
transition: transform 0.15s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
|
||||
}
|
||||
.btn.ghost:hover { border-color: #333947; background: var(--card); opacity: 1; }
|
||||
|
||||
.reveal {
|
||||
opacity: 0; transform: translateY(14px);
|
||||
filter: blur(6px);
|
||||
transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease);
|
||||
}
|
||||
.reveal.in { opacity: 1; transform: translateY(0); filter: blur(0); }
|
||||
|
||||
.hero { padding: 88px 0 64px; }
|
||||
.hero h1 {
|
||||
font-size: 46px; line-height: 1.12; margin: 0 0 20px; letter-spacing: -0.03em;
|
||||
font-weight: 600; max-width: 620px;
|
||||
}
|
||||
.hero .accent { color: var(--accent); }
|
||||
.hero p { color: var(--muted); font-size: 17px; max-width: 460px; margin: 0 0 32px; line-height: 1.55; }
|
||||
|
||||
.divider { height: 1px; background: var(--border); margin: 0; }
|
||||
|
||||
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); margin: 64px 0; }
|
||||
.feature { background: var(--bg); padding: 32px 28px; }
|
||||
.feature .idx { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 14px; }
|
||||
.feature h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
|
||||
.feature p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.55; }
|
||||
|
||||
.steps { padding: 64px 0; }
|
||||
.section-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
|
||||
.steps h2, .plans h2 { font-size: 24px; margin: 0 0 40px; font-weight: 600; letter-spacing: -0.01em; }
|
||||
.step-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
|
||||
.step .num { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
|
||||
.step p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.5; }
|
||||
|
||||
.plans { padding: 8px 0 72px; }
|
||||
.plan-row { display: flex; gap: 1px; background: var(--border); border-radius: 12px; overflow: hidden; }
|
||||
.plan {
|
||||
flex: 1; background: var(--card); padding: 20px 16px; text-align: center;
|
||||
transition: background 0.25s var(--ease);
|
||||
}
|
||||
.plan:hover { background: #171a20; }
|
||||
.plan .d { font-weight: 600; font-size: 15px; }
|
||||
.plan .l { color: var(--muted); font-size: 12px; margin-top: 4px; }
|
||||
|
||||
.cta { text-align: center; padding: 16px 0 88px; }
|
||||
|
||||
footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); font-size: 13px; }
|
||||
footer a { text-decoration: underline; text-underline-offset: 2px; }
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.hero h1 { font-size: 32px; }
|
||||
.grid { grid-template-columns: 1fr; }
|
||||
.step-list { grid-template-columns: 1fr; gap: 24px; }
|
||||
.plan-row { flex-wrap: wrap; }
|
||||
.plan { min-width: 45%; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
.reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<header>
|
||||
<div class="logo">MBS Panel</div>
|
||||
<nav>
|
||||
<a href="#features">Возможности</a>
|
||||
<a href="#plans">Тарифы</a>
|
||||
<a href="/cabinet.html">Кабинет</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<section class="hero">
|
||||
<h1 class="reveal">Интернет без границ<br><span class="accent">и без замедлений</span></h1>
|
||||
<p class="reveal">Быстрый доступ к любимым сайтам и сервисам. Трафик не отличить от обычного HTTPS, скорость — на выделенных мощностях.</p>
|
||||
<a class="btn reveal" href="https://t.me/YourBot_robot" target="_blank">Получить доступ</a>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="wrap">
|
||||
<div class="grid" id="features">
|
||||
<div class="feature reveal">
|
||||
<div class="idx">01</div>
|
||||
<h3>Незаметный трафик</h3>
|
||||
<p>VLESS + Reality маскирует соединение под обычный HTTPS — не режется и не палится провайдером.</p>
|
||||
</div>
|
||||
<div class="feature reveal">
|
||||
<div class="idx">02</div>
|
||||
<h3>Реальная скорость</h3>
|
||||
<p>Выделенные мощности, без переподписки и очередей — видео и игры без лагов.</p>
|
||||
</div>
|
||||
<div class="feature reveal">
|
||||
<div class="idx">03</div>
|
||||
<h3>Одна ссылка</h3>
|
||||
<p>Подписка сама добавляет все сервера в Happ. Никаких конфигов вручную.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="steps">
|
||||
<div class="section-label reveal">Как подключиться</div>
|
||||
<div class="step-list">
|
||||
<div class="step reveal"><div class="num">01</div><p>Открой бота в Telegram</p></div>
|
||||
<div class="step reveal"><div class="num">02</div><p>Выбери срок подписки</p></div>
|
||||
<div class="step reveal"><div class="num">03</div><p>Открой ссылку — добавится в Happ сама</p></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="plans" id="plans">
|
||||
<h2 class="reveal">Тарифы</h2>
|
||||
<div class="plan-row reveal">
|
||||
<div class="plan"><div class="d">7 дней</div><div class="l">пробный</div></div>
|
||||
<div class="plan"><div class="d">1 месяц</div><div class="l">стандарт</div></div>
|
||||
<div class="plan"><div class="d">3 месяца</div><div class="l">выгодно</div></div>
|
||||
<div class="plan"><div class="d">6 месяцев</div><div class="l">выгоднее</div></div>
|
||||
<div class="plan"><div class="d">1 год</div><div class="l">максимум</div></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cta reveal">
|
||||
<a class="btn ghost" href="https://t.me/YourBot_robot" target="_blank">Выбрать тариф в боте</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="wrap">
|
||||
example.com — <a href="/cabinet.html">личный кабинет</a> — подписка через <a href="https://sub.example.com" target="_blank">sub.example.com</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
const io = new IntersectionObserver((entries) => {
|
||||
entries.forEach((e, i) => {
|
||||
if (e.isIntersecting) {
|
||||
e.target.style.transitionDelay = (i % 3) * 0.08 + "s";
|
||||
e.target.classList.add("in");
|
||||
io.unobserve(e.target);
|
||||
}
|
||||
});
|
||||
}, { threshold: 0.15 });
|
||||
document.querySelectorAll(".reveal").forEach((el) => io.observe(el));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue