1
0
forked from finn/site

navbar current decorator

This commit is contained in:
2024-08-05 09:09:51 -07:00
parent 82baefb3d2
commit 2ba3fe0a7e
8 changed files with 54 additions and 59 deletions

View File

@ -11,12 +11,12 @@
<body>
<header>
<nav>
<a href="{{ url_for('index') }}">home</a>
<a href="{{ url_for('explore') }}">explore</a>
<a {% block indexcurrent %}{% endblock %} href="{{ url_for('index') }}">home</a>
<a {% block explorecurrent %}{% endblock %} href="{{ url_for('explore') }}">explore</a>
{% if current_user.is_anonymous %}
<a href="{{ url_for('login') }}">login</a>
<a {% block logincurrent %}{% endblock %} href="{{ url_for('login') }}">login</a>
{% else %}
<a href="{{ url_for('user', username=current_user.username) }}">profile</a>
<a {% block profilecurrent %}{% endblock %} href="{{ url_for('user', username=current_user.username) }}">profile</a>
<a href="{{ url_for('logout') }}">logout</a>
{% endif %}