44 lines
1.9 KiB
HTML
44 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{% block title %}摄影社论坛{% endblock %}</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="{{ url_for('static', filename='theme.css') }}" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-white mb-3 mt-2 px-3">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="{{ url_for('feed.discover') }}">摄影社</a>
|
|
<div>
|
|
<a class="btn btn-link" href="{{ url_for('feed.discover') }}">发现</a>
|
|
{% if current_user.is_authenticated %}
|
|
<a class="btn btn-link" href="{{ url_for('feed.following') }}">关注</a>
|
|
<a class="btn btn-link" href="{{ url_for('users.profile', user_id=current_user.id) }}">我的主页</a>
|
|
<a class="btn btn-link" href="{{ url_for('users.notifications') }}">通知</a>
|
|
<a class="btn btn-link" href="{{ url_for('posts.create') }}">发布作品</a>
|
|
<a class="btn btn-link" href="{{ url_for('activities.list_activities') }}">活动</a>
|
|
{% if current_user.role == 'admin' %}
|
|
<a class="btn btn-link" href="{{ url_for('admin.dashboard') }}">管理员</a>
|
|
{% endif %}
|
|
<a class="btn btn-link" href="{{ url_for('auth.logout') }}">退出</a>
|
|
{% else %}
|
|
<a class="btn btn-link" href="{{ url_for('auth.login') }}">登录</a>
|
|
<a class="btn btn-brand" href="{{ url_for('auth.register') }}">注册</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="container">
|
|
{% with messages = get_flashed_messages() %}
|
|
{% if messages %}
|
|
<div class="alert alert-info">{{ messages[0] }}</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html>
|