broadfield-dev's picture
Update templates/base.html
06f9d02 verified
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Chirp App</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css">
<style>
.post { margin-bottom: 1rem; }
.post-author { font-weight: bold; }
.post-date { color: var(--muted-color); font-size: 0.8rem; }
.alert { padding: 1rem; margin-bottom: 1rem; border-radius: var(--border-radius); }
.alert-success { background-color: var(--pico-color-green-100); border: 1px solid var(--pico-color-green-300); }
.alert-danger { background-color: var(--pico-color-red-100); border: 1px solid var(--pico-color-red-300); }
</style>
</head>
<body>
<nav class="container-fluid">
<ul>
<li><strong><a href="{{ url_for('index') }}">Chirp</a></strong></li>
</ul>
<ul>
{% if 'username' in session %}
<li>Hello, {{ session.username }}</li>
<!-- NEW DOWNLOAD BUTTON -->
<li><a href="{{ url_for('download_data') }}" role="button" class="contrast">Download My Data</a></li>
<li><a href="{{ url_for('logout') }}" role="button" class="secondary">Logout</a></li>
{% endif %}
</ul>
</nav>
<main 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 %}
</main>
</body>
</html>