178 lines
5.4 KiB
HTML
178 lines
5.4 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<meta name="theme-color" content="#667eea" />
|
||
<title>NoteJS Backend</title>
|
||
|
||
<!-- Предотвращение мерцания темы -->
|
||
<script>
|
||
(function () {
|
||
try {
|
||
// Получаем сохраненную тему
|
||
const savedTheme = localStorage.getItem("theme");
|
||
// Получаем системные предпочтения
|
||
const systemPrefersDark = window.matchMedia(
|
||
"(prefers-color-scheme: dark)"
|
||
).matches;
|
||
|
||
// Определяем тему: сохраненная или системная
|
||
const theme = savedTheme || (systemPrefersDark ? "dark" : "light");
|
||
|
||
// Устанавливаем тему до загрузки CSS
|
||
if (theme === "dark") {
|
||
document.documentElement.setAttribute("data-theme", "dark");
|
||
} else {
|
||
document.documentElement.setAttribute("data-theme", "light");
|
||
}
|
||
|
||
// Получаем и устанавливаем accentColor
|
||
const savedAccentColor = localStorage.getItem("accentColor");
|
||
const accentColor = savedAccentColor || "#667eea";
|
||
|
||
// Устанавливаем CSS переменную для accent цвета
|
||
document.documentElement.style.setProperty("--accent-color", accentColor);
|
||
|
||
// Устанавливаем цвет для meta theme-color
|
||
const themeColorMeta = document.querySelector('meta[name="theme-color"]');
|
||
if (themeColorMeta) {
|
||
themeColorMeta.setAttribute(
|
||
"content",
|
||
theme === "dark" ? "#1a1a1a" : accentColor
|
||
);
|
||
}
|
||
} catch (e) {
|
||
// В случае ошибки устанавливаем светлую тему по умолчанию
|
||
document.documentElement.setAttribute("data-theme", "light");
|
||
document.documentElement.style.setProperty("--accent-color", "#667eea");
|
||
}
|
||
})();
|
||
</script>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||
Oxygen, Ubuntu, Cantarell, sans-serif;
|
||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||
min-height: 100vh;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #fff;
|
||
}
|
||
|
||
.container {
|
||
background: rgba(255, 255, 255, 0.1);
|
||
backdrop-filter: blur(10px);
|
||
border-radius: 20px;
|
||
padding: 40px;
|
||
max-width: 600px;
|
||
text-align: center;
|
||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||
}
|
||
|
||
h1 {
|
||
font-size: 2.5em;
|
||
margin-bottom: 20px;
|
||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||
}
|
||
|
||
.status {
|
||
display: inline-block;
|
||
background: rgba(76, 175, 80, 0.3);
|
||
padding: 10px 20px;
|
||
border-radius: 25px;
|
||
margin: 20px 0;
|
||
font-size: 1.1em;
|
||
border: 2px solid rgba(76, 175, 80, 0.6);
|
||
}
|
||
|
||
.info {
|
||
margin: 30px 0;
|
||
font-size: 1.1em;
|
||
line-height: 1.8;
|
||
}
|
||
|
||
.button {
|
||
display: inline-block;
|
||
background: rgba(255, 255, 255, 0.9);
|
||
color: #667eea;
|
||
padding: 15px 40px;
|
||
border-radius: 30px;
|
||
text-decoration: none;
|
||
font-weight: bold;
|
||
font-size: 1.1em;
|
||
margin: 10px;
|
||
transition: all 0.3s ease;
|
||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
||
}
|
||
|
||
.button:hover {
|
||
transform: translateY(-2px);
|
||
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
|
||
background: #fff;
|
||
}
|
||
|
||
.code {
|
||
background: rgba(0, 0, 0, 0.3);
|
||
padding: 15px;
|
||
border-radius: 10px;
|
||
margin: 20px 0;
|
||
font-family: "Courier New", monospace;
|
||
font-size: 0.9em;
|
||
}
|
||
|
||
.emoji {
|
||
font-size: 3em;
|
||
margin-bottom: 20px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<div class="emoji">🚀</div>
|
||
<h1>NoteJS Backend API</h1>
|
||
|
||
<div class="status">✅ Сервер работает</div>
|
||
|
||
<div class="info">
|
||
<p>Это Backend API сервер NoteJS React.</p>
|
||
<p>Для доступа к приложению используйте Frontend:</p>
|
||
</div>
|
||
|
||
<div class="code">
|
||
<strong>Frontend (Development):</strong><br />
|
||
http://localhost:5173
|
||
</div>
|
||
|
||
<a href="http://localhost:5173" class="button"> Открыть приложение </a>
|
||
|
||
<div
|
||
class="info"
|
||
style="margin-top: 40px; font-size: 0.9em; opacity: 0.8"
|
||
>
|
||
<p><strong>Backend API:</strong> http://localhost:3001</p>
|
||
<p>
|
||
<strong>Endpoints:</strong> /api/auth, /api/notes, /api/user, /api/ai
|
||
</p>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
// Автоматическое перенаправление на frontend через 3 секунды
|
||
setTimeout(() => {
|
||
if (confirm("Перейти на frontend приложение?")) {
|
||
window.location.href = "http://localhost:5173";
|
||
}
|
||
}, 2000);
|
||
</script>
|
||
</body>
|
||
</html>
|