notification_count fix

This commit is contained in:
Jérémy Munsch 2024-07-17 10:43:13 +02:00
parent a80f4effdf
commit fc48a44ca2
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
4 changed files with 9 additions and 7 deletions

View file

@ -81,7 +81,7 @@
<li class="nav-item">
<a class="btn btn-link text-tertiary position-relative p-1" href="{{ route('club.notifications.index') }}">
@include('club.icons.cloche')
@if ($notifications_count)
@if (!empty($notifications_count))
<span class="position-absolute start-85 translate-middle badge rounded-pill bg-danger top-15">
{{ $notifications_count }}
<span class="visually-hidden">{{ __('Nouvelles notifications') }}</span>

View file

@ -28,7 +28,7 @@
<span class="nav-icon">@include('club.icons.cloche')</span>
<a class="nav-link" href="{{ route('club.notifications.index') }}"
title="{{ __('Go to page :page', ['page' => 'Notifications']) }}">{{ __('Notifications') }}</a>
@if ($notifications_count)
@if (!empty($notifications_count))
<span class="nav-notification ms-auto">
<span class="visually-hidden">{{ __('Nouvelles notifications') }}</span>
<span>{{ $notifications_count }}</span>

View file

@ -17,7 +17,7 @@
<div class="col-12 mb-3 text-center">
<span class="header-icon position-relative mb-3">
@include('club.icons.cloche')
@if ($notifications_count)
@if (!empty($notifications_count))
<span class="position-absolute start-100 translate-middle bg-danger border-light rounded-circle top-0 border px-2 py-1">
<span class="visually-hidden">{{ __('Nouvelles notifications') }}</span>
<span>{{ $notifications_count }}</span>

View file

@ -13,10 +13,12 @@
@auth('club')
<span class="d-none d-sm-inline position-relative ms-3 py-1">
<i class="fa-regular fa-user fs-4"></i>
<span class="position-absolute start-100 translate-middle badge rounded-pill text-bg-danger top-0 px-1">
{{ $notifications_count }}
<span class="visually-hidden">{{ __('Notifications') }}</span>
</span>
@if (!empty($notifications_count))
<span class="position-absolute start-100 translate-middle badge rounded-pill text-bg-danger top-0 px-1">
{{ $notifications_count }}
<span class="visually-hidden">{{ __('Notifications') }}</span>
</span>
@endif
</span>
@endauth
</span>