45 lines
1.6 KiB
HTML
45 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Чудо Обувь</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="logo-area">
|
|
<img src="{{ url_for('static', filename='logo.png') }}" alt="Логотип" height="40">
|
|
<h1>Чудо Обувь</h1>
|
|
</div>
|
|
<nav>
|
|
<a href="{{ url_for('index') }}">Каталог</a>
|
|
{% if current_role != 'guest' %}
|
|
<a href="{{ url_for('cart') }}">Корзина</a>
|
|
{% endif %}
|
|
{% if current_role in ['admin', 'manager'] %}
|
|
<a href="{{ url_for('orders') }}">Заказы</a>
|
|
{% endif %}
|
|
|
|
{% if current_role == 'guest' %}
|
|
<a href="{{ url_for('login') }}">Войти</a>
|
|
{% else %}
|
|
<span class="user-info">{{ current_user }} ({{ current_role }})</span>
|
|
<a href="{{ url_for('logout') }}">Выйти</a>
|
|
{% endif %}
|
|
</nav>
|
|
</header>
|
|
|
|
<main>
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="flash {{ category }}">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html> |