Skip to content

Commit

Permalink
Remove the double scroll in the notification item (OrchardCMS#14781)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored and urbanit committed Mar 18, 2024
1 parent 19eee97 commit 0182971
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<i class="fa-regular fa-bell" aria-hidden="true" data-bs-toggle="tooltip" data-bs-original-title="@T["You have no unread notifications"]"></i>
}
</button>
<ul class="dropdown-menu dropdown-menu-end notification-navbar scrollable position-absolute" style="max-width: 20rem;">
<ul class="dropdown-menu dropdown-menu-end notification-navbar scrollable position-absolute">
@if (Model.Notifications.Count > 0)
{
var maxCount = Math.Min(Model.MaxVisibleNotifications, Model.Notifications.Count);
<li style="max-height: 30rem; overflow-y: auto;">
<li>
@for (int i = 0; i < maxCount; i++)
{
var notification = Model.Notifications[i];
Expand Down Expand Up @@ -61,7 +61,11 @@
</script>

<style at="Head">
.notification-navbar .notification-is-unread {
font-weight: 600 !important;
.notification-navbar {
max-width: 20rem;
}
.notification-navbar .notification-is-unread {
font-weight: 600 !important;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
<i class="fa-regular fa-bell" aria-hidden="true" data-bs-toggle="tooltip" data-bs-original-title="@T["You have no unread notifications"]"></i>
}
</button>
<ul class="dropdown-menu dropdown-menu-end notification-navbar scrollable position-absolute" style="max-width: 20rem;">
<ul class="dropdown-menu dropdown-menu-end notification-navbar scrollable position-absolute">
@if (Model.Notifications.Count > 0)
{
var maxCount = Math.Min(Model.MaxVisibleNotifications, Model.Notifications.Count);
<li style="max-height: 30rem; overflow-y: auto;">
<li>
@for (int i = 0; i < maxCount; i++)
{
var notification = Model.Notifications[i];
Expand Down Expand Up @@ -64,7 +64,17 @@
</script>

<style at="Head">
.notification-navbar .notification-is-unread {
font-weight: 600 !important;
.notification-navbar {
max-width: 20rem;
}
.notification-navbar .notification-is-unread {
font-weight: 600 !important;
}
.dropdown-menu.scrollable {
overflow-y: auto;
max-height: var(--oc-height-dropdown, 250px);
scrollbar-width: thin;
}
</style>

0 comments on commit 0182971

Please sign in to comment.