Files
classifieds/app/templates/base.html
T
2026-06-15 15:00:16 -04:00

58 lines
2.1 KiB
HTML

<!doctype html>
<html lang="{{ get_locale() }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Classifieds{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
{% block head %}{% endblock %}
</head>
<body>
<header class="site-header">
<div class="wrap">
<a class="brand" href="{{ url_for('main.index') }}">Classifieds</a>
<nav class="nav">
<a href="{{ url_for('listings.browse') }}">{{ _('Browse') }}</a>
{% if current_user.is_authenticated %}
<a href="{{ url_for('listings.create') }}">{{ _('Post') }}</a>
<a href="{{ url_for('listings.mine') }}">{{ _('My listings') }}</a>
<a href="{{ url_for('messaging.my_favorites') }}">{{ _('Saved') }}</a>
<a href="{{ url_for('messaging.inbox') }}" class="msg-link">
{{ _('Messages') }}
{% if unread_count %}<span class="badge-count">{{ unread_count }}</span>{% endif %}
</a>
<span class="hi">{{ current_user.display_name }}</span>
<a href="{{ url_for('auth.logout') }}">{{ _('Sign out') }}</a>
{% else %}
<a href="{{ url_for('auth.login') }}">{{ _('Sign in') }}</a>
<a class="btn" href="{{ url_for('auth.register') }}">{{ _('Register') }}</a>
{% endif %}
<span class="langs">
{% for code in SUPPORTED_LOCALES %}
<a href="{{ url_for('i18n.set_lang', code=code) }}"
class="{{ 'on' if get_locale()|string == code else '' }}">{{ code|upper }}</a>
{% endfor %}
</span>
</nav>
</div>
</header>
<main class="wrap">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="flashes">
{% for category, msg in messages %}
<div class="flash flash-{{ category }}">{{ msg }}</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</main>
<footer class="site-footer">
<div class="wrap">© {{ 2025 }} Classifieds</div>
</footer>
</body>
</html>