Fixing Notifications

This commit is contained in:
Silversthorn 2024-10-06 20:49:33 +02:00
parent 3cab45fd5e
commit 315d009481
2 changed files with 28 additions and 14 deletions

View File

@ -30,30 +30,46 @@ body.sidebar-icon-only .navbar-toggler .mdi-chevron-double-left {
text-transform: none;
}
.mw-25 {
max-width: 25% !important;
.vw-40 {
width: 40vw !important;
}
.mh-25 {
max-height: 25% !important;
.vh-40 {
height: 40vh !important;
}
.mw-25 {
max-width: 25% !important;
}
.mw-50 {
max-width: 50% !important;
}
.mh-50 {
max-height: 50% !important;
}
.mw-75 {
max-width: 75% !important;
}
.mw-80 {
max-width: 80% !important;
}
.mh-25 {
max-height: 25% !important;
}
.mh-50 {
max-height: 50% !important;
}
.mh-75 {
max-height: 75% !important;
}
.mh-80 {
max-height: 80% !important;
}
/**************************************************************/
/**************************************************************/

View File

@ -6,8 +6,8 @@
text-danger
{% end %}
"></i><span id="notif-count" class="badge badge-notify"></span> </a>
<div class="dropdown-menu dropdown-menu-right navbar-dropdown notif-div" style="width: 40vw; max-height: 80vh;" aria-labelledby="notifDropdown">
<ul class="pt-3" id="announcements">
<div class="p-0 dropdown-menu dropdown-menu-right navbar-dropdown notif-div vw-40 max-vh-80" aria-labelledby="notifDropdown">
<ul class="p-3" id="announcements">
</ul>
</div>
</li>
@ -104,8 +104,7 @@
$("#notif-count").html(data.length);
$("#announcements").html(text);
} else {
$("#announcements").html(`<p style='margin-top: 15px;' class='text-center'><i class="fa fa-bell-slash" aria-hidden="true"></i>
</p>`);
$("#announcements").html(`<li><p class='my-3 text-center'><i class="fa fa-bell-slash" aria-hidden="true"></i></p></li>`);
$("#notif-count").hide()
}
$(".clear-button").on("click", function (event) {
@ -119,8 +118,7 @@
localStorage.setItem("notif-count", notif_count);
$("#notif-count").html(notif_count);
} else {
$("#announcements").html(`<p style='margin-top: 15px;' class='text-center'><i class="fa fa-bell-slash" aria-hidden="true"></i>
</p>`)
$("#announcements").html(`<li><p class='my-3 text-center'><i class="fa fa-bell-slash" aria-hidden="true"></i></p></li>`)
$("#notif-count").html("");
}