From fbec103ae7830d18b6946ae6c4a5c2015ada5244 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Wed, 26 Jul 2017 18:46:13 +0530 Subject: [PATCH] Remove inline styling, add css classes (#10077) --- erpnext/public/css/email.css | 29 +++++++++++++++++ erpnext/public/less/email.less | 32 +++++++++++++++++++ .../templates/emails/daily_work_summary.html | 20 +++++------- 3 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 erpnext/public/css/email.css create mode 100644 erpnext/public/less/email.less diff --git a/erpnext/public/css/email.css b/erpnext/public/css/email.css new file mode 100644 index 0000000000..8cf1a31ad6 --- /dev/null +++ b/erpnext/public/css/email.css @@ -0,0 +1,29 @@ +.panel-header { + background-color: #fafbfc; + border: 1px solid #d1d8dd; + border-radius: 3px 3px 0 0; +} +.panel-body { + background-color: #fff; + border: 1px solid #d1d8dd; + border-top: none; + border-radius: 0 0 3px 3px; + overflow-wrap: break-word; +} +.sender-avatar { + width: 24px; + height: 24px; + border-radius: 3px; + vertical-align: middle; +} +.sender-avatar-placeholder { + width: 24px; + height: 24px; + border-radius: 3px; + vertical-align: middle; + line-height: 24px; + text-align: center; + color: #d1d8dd; + border: 1px solid #d1d8dd; + background-color: #fff; +} diff --git a/erpnext/public/less/email.less b/erpnext/public/less/email.less new file mode 100644 index 0000000000..4077c4940d --- /dev/null +++ b/erpnext/public/less/email.less @@ -0,0 +1,32 @@ +@import "../../../../frappe/frappe/public/less/variables.less"; + +.panel-header { + background-color: @light-bg; + border: 1px solid @border-color; + border-radius: 3px 3px 0 0; +} + +.panel-body { + background-color: #fff; + border: 1px solid @border-color; + border-top: none; + border-radius: 0 0 3px 3px; + overflow-wrap: break-word; +} + +.sender-avatar { + width: 24px; + height: 24px; + border-radius: 3px; + vertical-align: middle; +} + +.sender-avatar-placeholder { + .sender-avatar; + + line-height: 24px; + text-align: center; + color: @border-color; + border: 1px solid @border-color; + background-color: #fff; +} \ No newline at end of file diff --git a/erpnext/templates/emails/daily_work_summary.html b/erpnext/templates/emails/daily_work_summary.html index 726de3b890..a22e09cb8d 100644 --- a/erpnext/templates/emails/daily_work_summary.html +++ b/erpnext/templates/emails/daily_work_summary.html @@ -1,28 +1,25 @@ -
-

{{ title }}

-
+

{{ title }}

{% for reply in replies %} - +
@@ -30,13 +27,12 @@
{% if reply.image %} - + {% else %} -
+
{{ reply.sender_name[0] }}
{% endif %}
-
+
{{ reply.sender_name }}
- +
@@ -51,7 +47,7 @@ {% if did_not_reply %}
-
+
{{ reply.content }}
-
+

{{ did_not_reply_title }}: {{ did_not_reply }}