Add a navigation component.
This commit is contained in:
parent
2910b2e62f
commit
d119e479f0
12
app/templates/layouts/components/navigation.twig
Normal file
12
app/templates/layouts/components/navigation.twig
Normal file
@ -0,0 +1,12 @@
|
||||
<nav>
|
||||
<ul>
|
||||
{% if session.get('authenticated') %}
|
||||
<li><a href="{{ url_for("dashboard") }}">Dashboard</a></li>
|
||||
<li><a href="{{ url_for("user-logout") }}">Logout</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ url_for("user-login-page") }}">Login</a></li>
|
||||
<li><a href="{{ url_for("user-register-page") }}">Register</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
@ -17,17 +17,7 @@
|
||||
{% block header %}{% endblock %}
|
||||
</header>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
{% if session.get('authenticated') %}
|
||||
<li><a href="{{ url_for("dashboard") }}">Dashboard</a></li>
|
||||
<li><a href="{{ url_for("user-logout") }}">Logout</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ url_for("user-login-page") }}">Login</a></li>
|
||||
<li><a href="{{ url_for("user-register-page") }}">Register</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% include 'layouts/components/navigation.twig' %}
|
||||
|
||||
<main>
|
||||
{% include 'layouts/components/flash.twig' %}
|
||||
|
Loading…
Reference in New Issue
Block a user