Merge pull request #2538 from betagouv/improve-messagerie-css

Improve messagerie CSS
This commit is contained in:
Pierre de La Morinerie 2018-09-11 10:06:36 +02:00 committed by GitHub
commit c37e672112
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 52 deletions

View file

@ -0,0 +1,37 @@
@import "colors";
@import "constants";
.message {
display: flex;
align-items: flex-start;
margin-bottom: $default-padding;
padding: $default-padding;
background: #FFFFFF;
border-radius: 3px;
.person-icon {
margin-right: $default-spacer;
}
h2 {
margin-bottom: $default-spacer;
}
.mail {
font-weight: bold;
}
.guest,
.date {
font-size: 12px;
color: $grey;
}
.date {
float: right;
}
.attachment-link {
margin-top: $default-spacer;
}
}

View file

@ -1,58 +1,25 @@
@import "colors"; @import "colors";
@import "common";
@import "constants"; @import "constants";
.messagerie { .messages-list {
.messages-list { max-height: 350px;
max-height: 350px; overflow-y: scroll;
overflow-y: scroll; border: 1px solid $border-grey;
border: 1px solid $border-grey; background: $light-grey;
background: $light-grey; padding: 2 * $default-spacer;
padding: 2 * $default-spacer; margin-bottom: $default-spacer;
margin-bottom: $default-spacer; border-radius: 4px;
border-radius: 4px;
> li { .message {
display: flex; width: 80%;
align-items: flex-start;
margin-bottom: $default-padding;
padding: $default-padding;
background: #FFFFFF;
width: 80%;
border-radius: 3px;
&.from-me { &.from-me {
margin-left: auto; margin-left: auto;
}
} }
} }
}
.person-icon { .messagerie {
margin-right: $default-spacer;
}
h2 {
margin-bottom: $default-spacer;
}
.mail {
font-weight: bold;
}
.guest,
.date {
font-size: 12px;
color: $grey;
}
.date {
float: right;
}
.attachment-link {
margin-top: $default-spacer;
}
.message-textarea { .message-textarea {
margin-bottom: $default-spacer; margin-bottom: $default-spacer;
} }

View file

@ -44,10 +44,6 @@ th {
padding-left: 0; padding-left: 0;
max-height: none; max-height: none;
li {
margin-bottom: 40px;
}
h2 { h2 {
font-size: 110%; font-size: 110%;
} }
@ -58,6 +54,10 @@ th {
} }
} }
.message {
margin-bottom: 40px;
}
.updated-at { .updated-at {
display: none; display: none;
} }

View file

@ -1,7 +1,7 @@
.messagerie.container .messagerie.container
%ul.messages-list %ul.messages-list
- dossier.commentaires.each do |commentaire| - dossier.commentaires.each do |commentaire|
%li{ class: commentaire_is_from_me_class(commentaire, user_email) } %li.message{ class: commentaire_is_from_me_class(commentaire, user_email) }
= render partial: "shared/dossiers/messages/message", locals: { commentaire: commentaire, user_email: user_email, messagerie_seen_at: messagerie_seen_at } = render partial: "shared/dossiers/messages/message", locals: { commentaire: commentaire, user_email: user_email, messagerie_seen_at: messagerie_seen_at }
= render partial: "shared/dossiers/messages/form", locals: { commentaire: new_commentaire, form_url: form_url } = render partial: "shared/dossiers/messages/form", locals: { commentaire: new_commentaire, form_url: form_url }