93 lines
3.7 KiB
HTML
93 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>{% block title %}Phone Store{% endblock %} — Интернет-магазин смартфонов</title>
|
||
<script>
|
||
(function () {
|
||
try {
|
||
const savedTheme = localStorage.getItem('phone-store-theme');
|
||
const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||
document.documentElement.dataset.theme =
|
||
savedTheme || (systemDark ? 'dark' : 'light');
|
||
} catch (error) {
|
||
document.documentElement.dataset.theme = 'light';
|
||
}
|
||
})();
|
||
</script>
|
||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||
</head>
|
||
<body>
|
||
<!-- Шапка сайта -->
|
||
<header class="header">
|
||
<div class="container header-inner">
|
||
<a href="{{ url_for('index') }}" class="logo">
|
||
<span class="logo-icon">📱</span>
|
||
<span class="logo-text">Phone<span class="logo-accent">Store</span></span>
|
||
</a>
|
||
|
||
<nav class="nav">
|
||
<a href="{{ url_for('index') }}" class="nav-link">Каталог</a>
|
||
<a href="{{ url_for('cart') }}" class="nav-link cart-link">
|
||
Корзина
|
||
{% if cart_count > 0 %}
|
||
<span class="cart-badge" id="cart-badge">{{ cart_count }}</span>
|
||
{% endif %}
|
||
</a>
|
||
<button
|
||
class="theme-toggle"
|
||
id="theme-toggle"
|
||
type="button"
|
||
aria-label="Переключить тему"
|
||
title="Переключить тему"
|
||
>
|
||
<span class="theme-icon" aria-hidden="true">☾</span>
|
||
</button>
|
||
</nav>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- Сообщения (flash) -->
|
||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||
{% if messages %}
|
||
<div class="flash-container">
|
||
{% for category, message in messages %}
|
||
<div class="flash flash-{{ category }}">
|
||
<span>{{ message }}</span>
|
||
<button class="flash-close" onclick="this.parentElement.remove()">×</button>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
{% endif %}
|
||
{% endwith %}
|
||
|
||
<!-- Основной контент -->
|
||
<main class="main">
|
||
{% block content %}{% endblock %}
|
||
</main>
|
||
|
||
<!-- Подвал -->
|
||
<footer class="footer">
|
||
<div class="container">
|
||
<div class="footer-content">
|
||
<div class="footer-brand">
|
||
<span class="logo-text">Phone<span class="logo-accent">Store</span></span>
|
||
<p>Демонстрационный проект интернет-магазина</p>
|
||
</div>
|
||
<div class="footer-info">
|
||
<p>© 2026 Ксения Судакова. Лицензия MIT.</p>
|
||
<p>Товары и цены приведены только для демонстрации.</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
|
||
{% block scripts %}{% endblock %}
|
||
</body>
|
||
</html>
|