138 lines
7.2 KiB
HTML
138 lines
7.2 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Конный двор - Конно-спортивная база</title>
|
||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600&display=swap" rel="stylesheet">
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||
<script>
|
||
function setUserTimezone() {
|
||
const timezoneOffset = new Date().getTimezoneOffset();
|
||
fetch('/api/set_timezone', {
|
||
method: 'POST',
|
||
headers: { 'Content-Type': 'application/json' },
|
||
body: JSON.stringify({ timezone_offset: -timezoneOffset })
|
||
}).catch(() => {});
|
||
}
|
||
document.addEventListener('DOMContentLoaded', setUserTimezone);
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<div class="wrapper">
|
||
<header>
|
||
<h1>🐎 Конно-спортивная база "Конный двор" 🐎</h1>
|
||
<nav>
|
||
<ul>
|
||
<li><a href="{{ url_for('index') }}">Главная</a></li>
|
||
<li><a href="{{ url_for('about') }}">О себе</a></li>
|
||
<li><a href="{{ url_for('services') }}">Услуги</a></li>
|
||
<li><a href="{{ url_for('abonements') }}">Абонементы</a></li>
|
||
<li><a href="{{ url_for('certificates') }}">Сертификаты</a></li>
|
||
<li><a href="{{ url_for('gallery') }}">Фотогалерея</a></li>
|
||
<li><a href="{{ url_for('discounts') }}">Скидки</a></li>
|
||
<li><a href="{{ url_for('reviews') }}">Отзывы</a></li>
|
||
{% if session.user_id %}
|
||
<li><a href="{{ url_for('order') }}">Заказать</a></li>
|
||
<li><a href="{{ url_for('my_orders') }}" id="messages-link">
|
||
Мои заказы
|
||
<span id="unread-badge" style="background: #dc3545; color: white; border-radius: 50%; padding: 2px 6px; font-size: 10px; display: none;">0</span>
|
||
</a></li>
|
||
{% if session.role == 'admin' %}
|
||
<li><a href="{{ url_for('admin_panel') }}">Админ панель</a></li>
|
||
<li><a href="{{ url_for('admin_messages') }}"> Сообщения</a></li>
|
||
{% endif %}
|
||
<li><a href="{{ url_for('logout') }}">Выйти ({{ session.username }})</a></li>
|
||
{% else %}
|
||
<li><a href="{{ url_for('login') }}">Вход</a></li>
|
||
<li><a href="{{ url_for('register') }}">Регистрация</a></li>
|
||
{% endif %}
|
||
</ul>
|
||
</nav>
|
||
</header>
|
||
|
||
<main class="content">
|
||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||
{% if messages %}
|
||
{% for category, message in messages %}
|
||
<div class="alert alert-{{ category }}">{{ message }}</div>
|
||
{% endfor %}
|
||
{% endif %}
|
||
{% endwith %}
|
||
{% block content %}{% endblock %}
|
||
</main>
|
||
|
||
<footer>
|
||
<div class="footer-content">
|
||
<div class="footer-section">
|
||
<h4>Контакты</h4>
|
||
<p>📞 +7 962 545 066</p>
|
||
<p>✉️ info@koniydvor.ru</p>
|
||
</div>
|
||
<div class="footer-section">
|
||
<h4>Адрес</h4>
|
||
<p>Республика Башкортостан, Белорецкий район,<br>ул. Благой ключ 101</p>
|
||
</div>
|
||
<div class="footer-section">
|
||
<h4>Часы работы</h4>
|
||
<p>Ежедневно: 9:00 – 20:00</p>
|
||
<p>Без выходных</p>
|
||
</div>
|
||
</div>
|
||
<div class="footer-bottom">
|
||
<p>© 2026 Конно-спортивная база "Конный двор"</p>
|
||
<p class="team-credit">🐎 Разработано командой Ганвестzxc 🐎</p>
|
||
<p class="footer-joke" style="font-size: 0.6rem; opacity: 0.5; margin-top: 0.5rem;">
|
||
</p>
|
||
</div>
|
||
</footer>
|
||
</div>
|
||
|
||
<style>
|
||
/* базовые стили — уже есть в style.css, здесь только самые основные на всякий случай */
|
||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||
body { font-family: 'Montserrat', sans-serif; background: url('/static/images/background.jpg') center/cover fixed; }
|
||
body::before { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: -1; }
|
||
.wrapper { min-height: 100vh; display: flex; flex-direction: column; }
|
||
header { background: rgba(44,24,16,0.92); border-bottom: 2px solid #d4a373; padding: 1rem 0; position: sticky; top: 0; z-index: 1000; }
|
||
header h1 { font-family: 'Playfair Display', serif; font-size: 2rem; text-align: center; color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
|
||
nav ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin-top: 1rem; }
|
||
nav a { color: white; text-decoration: none; padding: 0.6rem 1.2rem; border-radius: 50px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); transition: 0.2s; }
|
||
nav a:hover { background: #d4a373; color: #2c1810; transform: translateY(-2px); }
|
||
.content { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; width: 100%; flex: 1; }
|
||
h2 { font-family: 'Playfair Display', serif; color: #f5cba0; margin-bottom: 1.5rem; font-size: 2rem; border-left: 4px solid #f5cba0; padding-left: 1rem; }
|
||
footer { background: rgba(30,16,10,0.98); border-top: 3px solid #d4a373; padding: 2rem 0 1rem; margin-top: auto; }
|
||
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 1.5rem; padding: 0 1rem; }
|
||
.footer-section h4 { color: #ffdd99; font-size: 1.25rem; margin-bottom: 1rem; }
|
||
.footer-section p { color: #f0e2d0; margin: 0.5rem 0; }
|
||
.footer-bottom { text-align: center; padding: 1.5rem 1rem 0.5rem; border-top: 1px solid rgba(212,163,115,0.4); margin-top: 1.5rem; color: #ddc8aa; }
|
||
.team-credit { font-size: 0.75rem; margin-top: 0.5rem; color: #c9a87c; }
|
||
@media (max-width: 768px) {
|
||
header h1 { font-size: 1.2rem; }
|
||
nav a { padding: 0.3rem 0.6rem; font-size: 0.85rem; }
|
||
h2 { font-size: 1.5rem; }
|
||
.footer-content { grid-template-columns: 1fr; text-align: center; }
|
||
}
|
||
</style>
|
||
|
||
<script>
|
||
function checkUnreadMessages() {
|
||
fetch('/api/unread_count')
|
||
.then(res => res.json())
|
||
.then(data => {
|
||
const badge = document.getElementById('unread-badge');
|
||
if (badge && data.count > 0) {
|
||
badge.textContent = data.count;
|
||
badge.style.display = 'inline-block';
|
||
} else if (badge) badge.style.display = 'none';
|
||
})
|
||
.catch(e => console.error(e));
|
||
}
|
||
{% if session.user_id %}
|
||
setInterval(checkUnreadMessages, 10000);
|
||
checkUnreadMessages();
|
||
{% endif %}
|
||
</script>
|
||
</body>
|
||
</html>
|