V4 Theme - Re-add the Top Nav for unauthenticated users

This commit is contained in:
Aaron Kable 2024-04-10 01:09:02 +00:00 committed by Ariel Rin
parent 98f0d77f3f
commit 97466bcdfb
2 changed files with 14 additions and 9 deletions

View File

@ -39,15 +39,12 @@
</head> </head>
<body> <body>
{% if user.is_authenticated %}
<!-- Top Menu, Blocks don't work in "include" tagged views --> <!-- Top Menu, Blocks don't work in "include" tagged views -->
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-primary"> <nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-primary">
<div class="container-fluid justify-content-start"> <div class="container-fluid justify-content-start">
{% if user.is_authenticated %} <a class="navbar-brand" data-bs-toggle="collapse" data-bs-target="#sidebar" role="button">
<a class="navbar-brand" data-bs-toggle="collapse" data-bs-target="#sidebar" role="button"> <i class="fa-solid fa-bars ms-2 me-2"></i>
<i class="fa-solid fa-bars ms-2 me-2"></i> </a>
</a>
{% endif %}
<div class="navbar-brand"> <div class="navbar-brand">
{% block header_nav_brand %}{{ SITE_NAME }}{% endblock %} {% block header_nav_brand %}{{ SITE_NAME }}{% endblock %}
@ -69,7 +66,9 @@
{% include 'allianceauth/top-menu-rh-default.html' %} {% include 'allianceauth/top-menu-rh-default.html' %}
{% endblock %} {% endblock %}
{% include 'menu/menu-notification-block.html' %} {% if user.is_authenticated %}
{% include 'menu/menu-notification-block.html' %}
{% endif %}
</ul> </ul>
</div> </div>
@ -78,7 +77,6 @@
</a> </a>
</div> </div>
</nav> </nav>
{% endif %}
<!-- End Top Menu --> <!-- End Top Menu -->
<!-- Body --> <!-- Body -->

View File

@ -1,5 +1,5 @@
{% load i18n %} {% load i18n %}
{% if user.is_authenticated %}
<li class="nav-item"> <li class="nav-item">
<a href="{% url 'authentication:add_character' %}" class="nav-link" title="{% translate 'Add Character' %}"> <a href="{% url 'authentication:add_character' %}" class="nav-link" title="{% translate 'Add Character' %}">
<i class="fa-solid fa-plus"></i> <i class="fa-solid fa-plus"></i>
@ -12,3 +12,10 @@
<span class="d-lg-none d-md-inline m-2">{% translate "Change Main" %}</span> <span class="d-lg-none d-md-inline m-2">{% translate "Change Main" %}</span>
</a> </a>
</li> </li>
{% else %}
<li class="nav-item">
<a href="{% url 'authentication:login' %}" class="nav-link" title="{% translate 'Sign In' %}">
<i class="fa-solid fa-right-to-bracket fa-fw "></i> {% translate "Sign In" %}
</a>
</li>
{% endif %}