37 lines
1.3 KiB
HTML
37 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}MyApp{% endblock %}</title>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light mb-4">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="{{ url_for('main.index') }}">MyApp</a>
|
|
<div class="d-flex gap-2">
|
|
{% if current_user.is_authenticated %}
|
|
<span class="navbar-text">Hi, {{ current_user.username }}</span>
|
|
<a class="btn btn-outline-secondary btn-sm" href="{{ url_for('auth.logout') }}">Log out</a>
|
|
{% else %}
|
|
<a class="btn btn-outline-primary btn-sm" href="{{ url_for('auth.login') }}">Log in</a>
|
|
<a class="btn btn-primary btn-sm" href="{{ url_for('auth.register') }}">Register</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container">
|
|
{% 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 %}
|
|
</div>
|
|
</body>
|
|
</html>
|