Skip to content

Commit

Permalink
Reflect FE for auth/logout flows
Browse files Browse the repository at this point in the history
  • Loading branch information
koldakov committed Jul 12, 2024
1 parent 280fec9 commit 5a5f99f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@
href="/graphql"
>GraphQL</a>
</li>
<li
class="nav-item"
>
{% if not current_user %}
<a
class="nav-link{% if active_page == 'user_auth' %} active{% endif %}"
href="{{ relative_path_for('user_auth') }}"
>Sign In</a>
{% else %}
<form action="{{ relative_path_for('user_logout') }}">
<button
type="submit"
class="btn"
>Logout</button>
</form>
{% endif %}
</li>
</ul>
</div>
</div>
Expand All @@ -72,6 +89,9 @@
<div
class="px-4 pt-5 my-5 text-center intro-background"
>
{% if current_user %}
<h3>Hi, {{ current_user.full_name }}, welcome to</h3>
{% endif %}
<h1
class="display-4 fw-bold"
>
Expand Down Expand Up @@ -105,11 +125,13 @@
>GraphQL
</a>
</div>
{% if not current_user %}
<div
class="d-grid d-sm-flex justify-content-sm-center mb-5"
>
{{ "Join our community today! Already, %(user_count)s have registered, and we're excited to welcome even more members."|format(user_count=user_count) }}
</div>
{% endif %}
</div>
</div>
{% endblock %}
Expand Down

0 comments on commit 5a5f99f

Please sign in to comment.