UX: Improve layout of avatar+icon notifications (#24851)

This commit is contained in:
Mark VanLandingham 2023-12-12 14:28:29 -06:00 committed by GitHub
parent de936f07e5
commit 097cef7d21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 10 deletions

View File

@ -6,7 +6,9 @@ export default class IconAvatar extends Component {
<template>
<div class="icon-avatar">
{{avatar @data.avatarTemplate "small"}}
<div class="icon-avatar__icon-wrapper">
{{dIcon @data.icon}}
</div>
</div>
</template>
}

View File

@ -558,11 +558,20 @@
// Styles to have user avatar positioned and sized correctly
.user-menu.show-avatars,
.user-notifications-list.show-avatars {
li {
li.notification,
li.bookmark,
li.message {
a {
align-items: center;
padding: 0.15em 0;
.item-label {
font-weight: bold;
}
.item-description {
color: var(--primary);
}
.icon-avatar {
display: flex;
position: relative;
@ -577,27 +586,40 @@
width: 100%;
height: 100%;
}
.d-icon {
display: block;
&__icon-wrapper {
position: absolute;
right: -1.25em;
top: -0.5em;
padding: 0.2em;
right: -0.65em;
top: -0.65em;
display: flex;
justify-content: center;
align-items: center;
width: 22px;
height: 22px;
border-radius: 100%;
background: var(--secondary);
color: var(--tertiary);
.d-icon {
display: block;
margin: 0;
padding: 0;
font-size: var(--font-down-1);
color: var(--primary);
}
}
}
& + div {
padding: 0.25em 0;
}
}
&.unread a .d-icon {
&.unread .icon-avatar__icon-wrapper {
background: var(--tertiary);
.d-icon {
color: var(--secondary);
}
}
}
}
.hamburger-panel .menu-panel.slide-in {
left: 0;