diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index cd7502ec1..f878fba23 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -45,7 +45,7 @@ .avatar__container { vertical-align: top; - width: 3.25em; + width: 3em; } .avatar { @@ -53,32 +53,16 @@ color: white; display: block; font-weight: 600; - height: 2.75em; - line-height: 2.75em; + height: 2.5em; + line-height: 2.5em; mso-line-height-rule: exactly; overflow: hidden; text-align: center; - width: 2.75em; + width: 2.5em; } - .btn { - background: #2d71e5; - border-color: #2d71e5; - border-radius: 3rem; - color: white !important; - font-weight: 500; - padding: 0.5em 1em; - text-decoration: none; - white-space: nowrap; - } - - .event__details { - margin-bottom: 0.2em; - margin-top: 0.2em; - } - - .event__title { - font-size: 1em; + .card__title { + font-size: 1.1em; font-weight: 900; margin-bottom: 0; margin-top: 0; @@ -96,11 +80,12 @@ } .notification__author { + font-size: 0.8em; opacity: 0.66; - margin-top: 0; + margin: 0; } - .notification__title { + .notification__board { font-size: 0.8em; font-weight: normal; margin-bottom: 0; @@ -109,6 +94,19 @@ text-transform: uppercase; } + .notification__details { + margin-bottom: 0; + margin-top: 0; + } + + .notificaton__mention { + background-color: #f8e3ab; + border-radius: 0.7em 0.2em 0.7em 0.2em; + color: inherit; + display: inline-flex; + padding: 0.1em 0.3em; + } + .margin-block-end-double { margin-bottom: 2em; } diff --git a/app/views/mailers/notification/bundle_mailer/_header.html.erb b/app/views/mailers/notification/bundle_mailer/_header.html.erb deleted file mode 100644 index d6a0ac1c2..000000000 --- a/app/views/mailers/notification/bundle_mailer/_header.html.erb +++ /dev/null @@ -1 +0,0 @@ -

#<%= notification.card.id %> | <%= notification.card.board.name %> | <%= notification.creator.name %>

diff --git a/app/views/mailers/notification/bundle_mailer/_header.text.erb b/app/views/mailers/notification/bundle_mailer/_header.text.erb deleted file mode 100644 index 7ee5632fd..000000000 --- a/app/views/mailers/notification/bundle_mailer/_header.text.erb +++ /dev/null @@ -1 +0,0 @@ -#<%= notification.card.id %> | <%= notification.card.board.name %> | <%= notification.creator.name %> diff --git a/app/views/mailers/notification/bundle_mailer/_notification.html.erb b/app/views/mailers/notification/bundle_mailer/_notification.html.erb index 543f1515c..8558be4b4 100644 --- a/app/views/mailers/notification/bundle_mailer/_notification.html.erb +++ b/app/views/mailers/notification/bundle_mailer/_notification.html.erb @@ -1,10 +1,4 @@ - - - -
  - <%= render "notification/bundle_mailer/header", notification: notification %> -
<%= mail_avatar_tag(notification.creator) %> diff --git a/app/views/mailers/notification/bundle_mailer/_notification.text.erb b/app/views/mailers/notification/bundle_mailer/_notification.text.erb index baaee2bf5..2cc2a4494 100644 --- a/app/views/mailers/notification/bundle_mailer/_notification.text.erb +++ b/app/views/mailers/notification/bundle_mailer/_notification.text.erb @@ -1,5 +1,2 @@ -================================================================================ - -<%= render "notification/bundle_mailer/header", notification: notification %> <%= render "notification/bundle_mailer/#{notification.source_type.underscore}/body", notification: notification %> diff --git a/app/views/mailers/notification/bundle_mailer/event/_body.html.erb b/app/views/mailers/notification/bundle_mailer/event/_body.html.erb index 89273ef0d..8d6ffee3f 100644 --- a/app/views/mailers/notification/bundle_mailer/event/_body.html.erb +++ b/app/views/mailers/notification/bundle_mailer/event/_body.html.erb @@ -1,9 +1,8 @@ <% event = notification.source %> -

- <%= link_to event_notification_title(event), notification.source %> -

- -

+

+ <%= notification.creator.familiar_name %> +

+

<%= event_notification_body(event) %>

diff --git a/app/views/mailers/notification/bundle_mailer/event/_body.text.erb b/app/views/mailers/notification/bundle_mailer/event/_body.text.erb index 5100aff60..f099414ba 100644 --- a/app/views/mailers/notification/bundle_mailer/event/_body.text.erb +++ b/app/views/mailers/notification/bundle_mailer/event/_body.text.erb @@ -1,7 +1,5 @@ <% event = notification.source %> -<%= event_notification_title(event) %> - +<%= notification.creator.name %>: <%= event_notification_body(event).squish %> - -<%= url_for notification %> +<%= url_for notification %> \ No newline at end of file diff --git a/app/views/mailers/notification/bundle_mailer/mention/_body.html.erb b/app/views/mailers/notification/bundle_mailer/mention/_body.html.erb index d08b01f4b..3213cf559 100644 --- a/app/views/mailers/notification/bundle_mailer/mention/_body.html.erb +++ b/app/views/mailers/notification/bundle_mailer/mention/_body.html.erb @@ -1,9 +1,8 @@ <% mention = notification.source %> -

- <%= link_to "#{mention.mentioner.first_name} mentioned you", mention %> -

- -

+ + <%= "#{mention.mentioner.first_name} mentioned you:" %> + +

<%= mention.source.mentionable_content.truncate(250) %>

diff --git a/app/views/mailers/notification/bundle_mailer/mention/_body.text.erb b/app/views/mailers/notification/bundle_mailer/mention/_body.text.erb index da6f5babd..3e80d4798 100644 --- a/app/views/mailers/notification/bundle_mailer/mention/_body.text.erb +++ b/app/views/mailers/notification/bundle_mailer/mention/_body.text.erb @@ -1,7 +1,5 @@ <% mention = notification.source %> -<%= mention.mentioner.first_name %> mentioned you. - +<%= mention.mentioner.first_name %> mentioned you: <%= mention.source.mentionable_content.truncate(250) %> - -<%= url_for mention %> +<%= url_for mention %> \ No newline at end of file diff --git a/app/views/mailers/notification/bundle_mailer/notification.html.erb b/app/views/mailers/notification/bundle_mailer/notification.html.erb index e7478b6b7..956baea91 100644 --- a/app/views/mailers/notification/bundle_mailer/notification.html.erb +++ b/app/views/mailers/notification/bundle_mailer/notification.html.erb @@ -2,7 +2,13 @@

Everything since <%= @bundle.starts_at.strftime("%-l%P on %A, %B %-d") %>

You have <%= link_to pluralize(@notifications.count, "new notification"), notifications_url %>.

- <%= render partial: "notification/bundle_mailer/notification", collection: @notifications, as: :notification %> + + <% @notifications.group_by(&:card).each do |card, notifications| %> +

<%= card.board.name %>

+ <%= link_to "##{ card.id } #{ card.title }", card, class: "card__title" %> + <%= render partial: "notification/bundle_mailer/notification", collection: notifications, as: :notification %> + <% end %> +