feat(routes): add about page

This commit is contained in:
gbrochar 2023-09-19 00:33:01 -04:00
parent a25d6f2f19
commit 8b4993d2fc
3 changed files with 14 additions and 0 deletions

View File

@ -65,6 +65,9 @@ def explore():
posts=posts.items, next_url=next_url,
prev_url=prev_url)
@bp.route('/about')
def about_page():
return render_template('about.html', title=_('About me'))
@bp.route('/user/<username>')
@login_required

10
app/templates/about.html Normal file
View File

@ -0,0 +1,10 @@
{% extends "base.html" %} {% block app_content %}
<h1>A propos</h1>
<p>
Bonjour, je m'appelle Gaëtan et j'ai modifié
<a href="https://github.com/miguelgrinberg/microblog"
>l'application Microblog de Miguel Grinberg pour ce TP</a
>.
</p>
{% endblock %}

View File

@ -20,6 +20,7 @@
<ul class="nav navbar-nav">
<li><a href="{{ url_for('main.index') }}">{{ _('Home') }}</a></li>
<li><a href="{{ url_for('main.explore') }}">{{ _('Explore') }}</a></li>
<li><a href="{{ url_for('main.about_page') }}">{{ _('About') }}</a></li>
</ul>
{% if g.search_form %}
<form class="navbar-form navbar-left" method="get" action="{{ url_for('main.search') }}">