TTW_Bot_GO/internal/webui/templates/base.html

45 lines
1.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>TTW_Bot</title>
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<nav>
<div>
<a href="/">Главная</a>
<a href="/platforms">Платформы</a>
<a href="/commands">Команды</a>
<a href="/events">События</a>
<a href="/hotkeys">Горячие клавиши</a>
<a href="/webservices">Веб-сервисы</a>
<a href="/logs">Логи</a>
<a href="/ai">Нейросети</a>
<a href="/notifications">Уведомления</a>
</div>
<div class="theme-switch" id="theme-toggle">🌙 Тёмная тема</div>
</nav>
<div class="container">
{{block "content" .}}{{end}}
</div>
<footer style="text-align: center; margin-top: 20px; font-size: 0.8em; color: gray;">
TTW_Bot версия 11.0.43
</footer>
<script>
const themeToggle = document.getElementById('theme-toggle');
const currentTheme = localStorage.getItem('theme');
if (currentTheme === 'dark') {
document.body.classList.add('dark');
themeToggle.textContent = '☀️ Светлая тема';
}
themeToggle.addEventListener('click', () => {
document.body.classList.toggle('dark');
const isDark = document.body.classList.contains('dark');
localStorage.setItem('theme', isDark ? 'dark' : 'light');
themeToggle.textContent = isDark ? '☀️ Светлая тема' : '🌙 Тёмная тема';
});
</script>
</body>
</html>