diff options
author | Matthew Lemon <y@yulqen.org> | 2024-10-20 14:23:25 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-20 14:23:25 +0100 |
commit | 791cf758caaf25a9375005bdd7f699e614729823 (patch) | |
tree | 23fdc3c2d43c234a9ee5a80e8b29f6b50ffba0b7 /alphabetlearning/templates | |
parent | e072504b83a35059f8986db614189042a3e65a71 (diff) |
Adds basic login, logout and profile link to nav
Diffstat (limited to 'alphabetlearning/templates')
-rw-r--r-- | alphabetlearning/templates/base.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/alphabetlearning/templates/base.html b/alphabetlearning/templates/base.html index ded8675..faadcd5 100644 --- a/alphabetlearning/templates/base.html +++ b/alphabetlearning/templates/base.html @@ -81,6 +81,14 @@ <!-- </div> --> </li> <li class="nav-item"> + {% if request.user.is_authenticated %} + <a class="nav-link text-gray fw-bold" href="{% url "users:detail" request.user.id %}">{{ request.user }}</a> + {% else %} + <a class="nav-link text-dark fw-bold" href="{% url "account_login" %}">Log in</a> + {% endif %} + </li> + + <li class="nav-item"> <a class="nav-link text-dark fw-bold" href="{% url "resources:resource_list" %}">Resources</a> </li> <li class="nav-item"> @@ -96,6 +104,11 @@ <a class="nav-link text-dark fw-bold" href="https://blog.joannalemon.com" target="_blank">Blog</a> </li> + <li> + {% if request.user.is_authenticated %} + <a class="nav-link text-gray fw-bold" href="{% url "account_logout" %}">Log out</a> + {% endif %} + </li> </ul> </div> </div> |