Spaces:
Sleeping
Sleeping
File size: 3,354 Bytes
f6278c5 b4487f6 f6278c5 b4487f6 f6278c5 b4487f6 f6278c5 b4487f6 f6278c5 5c85005 f6278c5 5c85005 b4487f6 f6278c5 6ec566b b4487f6 f998846 b4487f6 f998846 b4487f6 f6278c5 b4487f6 f998846 b4487f6 f998846 b4487f6 f6278c5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>{% block title %}Chatty{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/auth.css') }}">
<meta name="theme-color" content="#000000">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="manifest" href="{{ url_for('static', filename='manifest.json') }}">
{% block head %}{% endblock %}
</head>
<body>
<div class="container">
<header class="header">
<div class="header-content">
<!-- Title (left) -->
<div class="header-title">
<h1><a href="{{ url_for('index') }}" class="logo-link">Chatty</a></h1>
</div>
<!-- Navigation (right) -->
<nav class="header-nav">
{% if current_user.is_authenticated %}
<span class="user-info desktop-only">{{ current_user.email }}</span>
<form method="POST" action="{{ url_for('logout') }}" class="logout-form">
{% if config.WTF_CSRF_ENABLED %}
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
{% endif %}
<button type="submit" class="nav-button logout-button">
<span class="desktop-only">Logout</span>
<span class="mobile-only">↪</span>
</button>
</form>
{% elif is_anonymous %}
<span class="user-info anonymous-user desktop-only">Anonymous</span>
<a href="{{ url_for('login') }}" class="nav-button">
<span>Login</span>
</a>
<a href="{{ url_for('register') }}" class="nav-button">
<span>Register</span>
</a>
{% else %}
<a href="{{ url_for('login') }}" class="nav-button">
<span>Login</span>
</a>
<a href="{{ url_for('register') }}" class="nav-button">
<span>Register</span>
</a>
{% endif %}
</nav>
</div>
</header>
<main class="main-content">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="flash-messages">
{% for category, message in messages %}
<div class="flash-message flash-{{ category }}">{{ message }}</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</main>
</div>
{% block scripts %}{% endblock %}
</body>
</html> |