mirror of
https://gitlab.com/brutaldon/brutaldon
synced 2025-06-05 21:49:32 +02:00
Fix visibility of navbar entries when logged in
This commit is contained in:
@@ -89,78 +89,76 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% if request.session.instance %}
|
{% if request.session.active_instance and request.session.active_username %}
|
||||||
{% if request.session.username or request.session.access_token %}
|
<div class="navbar-menu is-active" id="navMenu">
|
||||||
<div class="navbar-menu is-active" id="navMenu">
|
<!-- navbar start, navbar end -->
|
||||||
<!-- navbar start, navbar end -->
|
<div class="navbar-start">
|
||||||
<div class="navbar-start">
|
<a href="{% url "home" %}" class="navbar-item">
|
||||||
<a href="{% url "home" %}" class="navbar-item">
|
<span class="fa fa-home"></span>
|
||||||
<span class="fa fa-home"></span>
|
<span>Home</span>
|
||||||
<span>Home</span>
|
</a>
|
||||||
</a>
|
<a class="navbar-item" href="{% url "note" %}">
|
||||||
<a class="navbar-item" href="{% url "note" %}">
|
<span class="fa fa-bell-o"></span>
|
||||||
<span class="fa fa-bell-o"></span>
|
{% if preferences.notifications and not preferences.theme.is_brutalist %}
|
||||||
{% if preferences.notifications and not preferences.theme.is_brutalist %}
|
<span ic-src="{% url 'notes_count' %}"
|
||||||
<span ic-src="{% url 'notes_count' %}"
|
ic-poll="{{ preferences.poll_frequency }}s"
|
||||||
ic-poll="{{ preferences.poll_frequency }}s"
|
ic-target="this"
|
||||||
ic-target="this"
|
ic-select-from-response="#notes-count">
|
||||||
ic-select-from-response="#notes-count">
|
<span
|
||||||
<span
|
{% if notifications and notifications != '0' %}
|
||||||
{% if notifications and notifications != '0' %}
|
class="badge"
|
||||||
class="badge"
|
{% endif %}
|
||||||
{% endif %}
|
data-badge="{{ notifications }}">
|
||||||
data-badge="{{ notifications }}">
|
Notifications</span>
|
||||||
Notifications</span>
|
</span>
|
||||||
</span>
|
{% elif notifications and preferences.notifications %}
|
||||||
{% elif notifications and preferences.notifications %}
|
<span ic-src="{% url 'notes_count' %}"
|
||||||
<span ic-src="{% url 'notes_count' %}"
|
ic-poll="{{ preferences.poll_frequency }}s"
|
||||||
ic-poll="{{ preferences.poll_frequency }}s"
|
ic-target="this"
|
||||||
ic-target="this"
|
ic-select-from-response="#notes-count">
|
||||||
ic-select-from-response="#notes-count">
|
<span >Notifications ({{ notifications }})</span>
|
||||||
<span >Notifications ({{ notifications }})</span>
|
</span>
|
||||||
</span>
|
{% else %}
|
||||||
{% else %}
|
<span >Notifications</span>
|
||||||
<span >Notifications</span>
|
{% endif %}
|
||||||
{% endif %}
|
</a>
|
||||||
</a>
|
<a class="navbar-item" href="{% url "local" %}">
|
||||||
<a class="navbar-item" href="{% url "local" %}">
|
<span class="fa fa-community"></span>
|
||||||
<span class="fa fa-community"></span>
|
<span >Local</span>
|
||||||
<span >Local</span>
|
</a>
|
||||||
</a>
|
<a class="navbar-item" href="{% url "fed" %}">
|
||||||
<a class="navbar-item" href="{% url "fed" %}">
|
<span class="fa fa-globe"></span>
|
||||||
<span class="fa fa-globe"></span>
|
<span >Federated</span>
|
||||||
<span >Federated</span>
|
</a>
|
||||||
</a>
|
<a class="navbar-item" href="{% url "toot" %}"
|
||||||
<a class="navbar-item" href="{% url "toot" %}"
|
ic-get-from="{% url "toot" %}"
|
||||||
ic-get-from="{% url "toot" %}"
|
ic-target="#new-toot-modal"
|
||||||
ic-target="#new-toot-modal"
|
ic-on-complete="$('#new-toot-modal').toggleClass('is-active');">
|
||||||
ic-on-complete="$('#new-toot-modal').toggleClass('is-active');">
|
<span class="fa fa-edit"> </span>
|
||||||
<span class="fa fa-edit"> </span>
|
<span >New Toot</span>
|
||||||
<span >New Toot</span>
|
</a>
|
||||||
</a>
|
<a class="navbar-item" href="{% url "search" %}"
|
||||||
<a class="navbar-item" href="{% url "search" %}"
|
ic-get-from="{% url "search" %}"
|
||||||
ic-get-from="{% url "search" %}"
|
ic-target="#new-toot-modal"
|
||||||
ic-target="#new-toot-modal"
|
ic-on-complete="$('#new-toot-modal').toggleClass('is-active');">
|
||||||
ic-on-complete="$('#new-toot-modal').toggleClass('is-active');">
|
<span class="fa fa-search"> </span>
|
||||||
<span class="fa fa-search"> </span>
|
<span >Search</span>
|
||||||
<span >Search</span>
|
</a>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-end" >
|
|
||||||
<a class="navbar-item" href="{% url "settings" %}">
|
|
||||||
<span class="fa fa-gear"></span>
|
|
||||||
<span >Settings</span>
|
|
||||||
</a>
|
|
||||||
<a class="navbar-item" href="{% url "logout" %}"
|
|
||||||
ic-get-from="{% url "logout" %}"
|
|
||||||
ic-target="body"
|
|
||||||
ic-confirm="Are you sure you want to log out?">
|
|
||||||
<span class="fa fa-power-off"></span>
|
|
||||||
<span >Log out</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
<div class="navbar-end" >
|
||||||
|
<a class="navbar-item" href="{% url "settings" %}">
|
||||||
|
<span class="fa fa-gear"></span>
|
||||||
|
<span >Settings</span>
|
||||||
|
</a>
|
||||||
|
<a class="navbar-item" href="{% url "logout" %}"
|
||||||
|
ic-get-from="{% url "logout" %}"
|
||||||
|
ic-target="body"
|
||||||
|
ic-confirm="Are you sure you want to log out?">
|
||||||
|
<span class="fa fa-power-off"></span>
|
||||||
|
<span >Log out</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</nav>
|
</nav>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Reference in New Issue
Block a user