60 lines
2.6 KiB
HTML
60 lines
2.6 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
{% if title %}
|
|
<title>{{ title }} - Microblog</title>
|
|
{% else %}
|
|
<title>Welcome to Microblog</title>
|
|
{% endif %}
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
|
</head>
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="{{ url_for('index') }}">Microblog</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
<li class="nav-item">
|
|
<a class="nav-link" aria-current="page" href="{{ url_for('index') }}">Home</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" aria-current="page" href="{{ url_for('explore') }}">Explore</a>
|
|
</li>
|
|
</ul>
|
|
<ul class="navbar-nav mb-2 mb-lg-0">
|
|
{% if current_user.is_anonymous %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" aria-current="page" href="{{ url_for('login') }}">Login</a>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item">
|
|
<a class="nav-link" aria-current="page" href="{{ url_for('user', username=current_user.username) }}">Profile</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" aria-current="page" href="{{ url_for('logout') }}">Logout</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<div class="container mt-3">
|
|
{% with messages = get_flashed_messages() %}
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-info" role="alert">{{ message }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
|
|
{{ moment.include_moment() }}
|
|
</body>
|
|
</html>
|