detect span.counter and allow to put styles on the number

This commit is contained in:
2022-02-01 13:31:26 +01:00
parent 730199cca4
commit ec29758547
5 changed files with 49 additions and 5 deletions

View File

@@ -73,8 +73,8 @@
<div class="item-col item-meta">
{# TODO twig extension to count comments #}
<div class="comment-counter visually-hidden">
<span>4 commentaires</span>
<div class="comment-counter">
<span class="counter">4 commentaires</span>
</div>
</div>

View File

@@ -1,11 +1,11 @@
<div class="notification-counter">
{% if counter.total > 0 %}
<span>
<span class="counter">
{{ 'notification.counter total notifications'|trans({'total': counter.total }) }}
</span>
{% endif %}
{% if counter.unread > 0 %}
<span>
<span class="counter">
{{ 'notification.counter unread notifications'|trans({'unread': counter.unread }) }}
</span>
{% endif %}