notification: add selector on title, move styles

This commit is contained in:
Mathieu Jaumotte 2022-01-10 15:59:36 +01:00
parent af6f3043ae
commit d60938352b
4 changed files with 34 additions and 36 deletions

View File

@ -1,3 +1,34 @@
div.notification {
h2.notification-title,
h6.notification-title {
a {
text-decoration: none;
}
&::before {
font-family: "ForkAwesome";
font-size: 80%;
margin-right: 0.3em;
}
}
div.read {
h2.notification-title,
h6.notification-title {
font-weight: 500;
&::before {
content: "\f2b7"; //envelope-open-o
}
}
}
div.unread {
h2.notification-title,
h6.notification-title {
&::before {
content: "\f003"; //envelope-o
}
}
}
}
/* /*
* Notifications List * Notifications List
*/ */
@ -11,13 +42,6 @@ div.notification-show {
&:first-child { &:first-child {
flex-grow: 1; flex-grow: 1;
/// 3
div.wrap-list {
div.wl-col.list {
width: 90%;
}
}
} }
&:last-child { &:last-child {
flex-grow: 0; flex-grow: 0;

View File

@ -108,31 +108,5 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
div.notification {
h2, h6 {
a {
text-decoration: none;
}
&::before {
font-family: "ForkAwesome";
font-size: 80%;
margin-right: 0.3em;
}
}
div.read {
h2, h6 {
font-weight: 500;
&::before {
content: "\f2b7"; //envelope-open-o
}
}
}
div.unread {
h2, h6 {
&::before {
content: "\f003"; //envelope-o
}
}
}
}
</style> </style>

View File

@ -1,6 +1,6 @@
<div class="item-bloc {% if not notification.isReadBy(app.user) %}unread{% else %}read{% endif %}"> <div class="item-bloc {% if not notification.isReadBy(app.user) %}unread{% else %}read{% endif %}">
<div class="item-row title"> <div class="item-row title">
<h2> <h2 class="notification-title">
<a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}"> <a href="{{ chill_path_add_return_path('chill_main_notification_show', {'id': notification.id}) }}">
{{ notification.title }} {{ notification.title }}
</a> </a>

View File

@ -9,7 +9,7 @@
{% if not notification.isSystem %} {% if not notification.isSystem %}
{% if notification.sender == app.user %} {% if notification.sender == app.user %}
<h6> <h6 class="notification-title">
<abbr title="{{ 'Le ' ~ notification.date|format_date('long') ~ '\n' ~ notification.title }}"> <abbr title="{{ 'Le ' ~ notification.date|format_date('long') ~ '\n' ~ notification.title }}">
{{ notification.date|format_datetime('short','short') }} {{ notification.date|format_datetime('short','short') }}
</abbr> </abbr>