Remove duplicated notifications request from layout.html

This commit is contained in:
0x29a 2023-01-29 16:25:29 +01:00
parent 3c52426a1c
commit 6ea2513790

View file

@ -25,6 +25,7 @@
{% block body %} {% block body %}
<nav class="navbar" aria-label="main navigation"> <nav class="navbar" aria-label="main navigation">
<div class="container"> <div class="container">
{% with request.user.unread_notification_count as notification_count %}
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="/"> <a class="navbar-item" href="/">
<img class="image logo" src="{% if site.logo_small %}{% get_media_prefix %}{{ site.logo_small }}{% else %}{% static "images/logo-small.png" %}{% endif %}" alt="{% blocktrans with site_name=site.name %}{{ site_name }} home page{% endblocktrans %}"> <img class="image logo" src="{% if site.logo_small %}{% get_media_prefix %}{{ site.logo_small }}{% else %}{% static "images/logo-small.png" %}{% endif %}" alt="{% blocktrans with site_name=site.name %}{{ site_name }} home page{% endblocktrans %}">
@ -67,7 +68,6 @@
> >
<i class="icon-dots-three-vertical" aria-hidden="true"></i> <i class="icon-dots-three-vertical" aria-hidden="true"></i>
{% with request.user.unread_notification_count as notification_count %}
<strong <strong
class="{% if not notification_count %}is-hidden {% elif request.user.has_unread_mentions %}is-danger {% else %}is-primary {% endif %} tag is-small px-1" class="{% if not notification_count %}is-hidden {% elif request.user.has_unread_mentions %}is-danger {% else %}is-primary {% endif %} tag is-small px-1"
data-poll-wrapper data-poll-wrapper
@ -77,7 +77,6 @@
{{ notification_count }} {{ notification_count }}
</strong> </strong>
</strong> </strong>
{% endwith %}
</button> </button>
</div> </div>
@ -108,14 +107,12 @@
<span class="is-sr-only">{% trans "Notifications" %}</span> <span class="is-sr-only">{% trans "Notifications" %}</span>
</span> </span>
</span> </span>
{% with request.user.unread_notification_count as notification_count %}
<span <span
class="{% if not notification_count %}is-hidden {% elif request.user.has_unread_mentions %}is-danger {% endif %}tag is-medium transition-x" class="{% if not notification_count %}is-hidden {% elif request.user.has_unread_mentions %}is-danger {% endif %}tag is-medium transition-x"
data-poll-wrapper data-poll-wrapper
> >
<span data-poll="notifications">{{ notification_count }}</span> <span data-poll="notifications">{{ notification_count }}</span>
</span> </span>
{% endwith %}
</a> </a>
</div> </div>
{% else %} {% else %}
@ -154,6 +151,7 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% endwith %}
</div> </div>
</nav> </nav>