Skip to content

Commit

Permalink
Update JS deps
Browse files Browse the repository at this point in the history
Updated MJML to v4 and changed the syntax of Django {% load %} tags to
not result in empty email sections.
  • Loading branch information
patrys committed May 31, 2018
1 parent fd4e44e commit 76c4924
Show file tree
Hide file tree
Showing 12 changed files with 5,526 additions and 5,617 deletions.
10,675 changes: 5,319 additions & 5,356 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"babel-eslint": "^8.2.2",
"babel-loader": "^8.0.0-beta.2",
"css-loader": "^0.28.11",
"eslint": "^4.6.1",
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.8.0",
Expand All @@ -58,15 +58,15 @@
"eslint-plugin-standard": "^3.0.1",
"file-loader": "^1.1.11",
"mini-css-extract-plugin": "^0.4.0",
"mjml": "^3.3.5",
"mjml": "^4.0.5",
"node-sass": "^4.9.0",
"postcss": "^6.0.21",
"postcss-loader": "^2.1.3",
"sass-loader": "^6.0.7",
"webpack": "^4.5.0",
"webpack": "^4.10.2",
"webpack-bundle-tracker": "^0.3.0",
"webpack-cli": "^2.0.14",
"webpack-dev-server": "^3.1.1"
"webpack-cli": "^2.1.4",
"webpack-dev-server": "^3.1.4"
},
"babel": {
"presets": [
Expand Down
52 changes: 23 additions & 29 deletions templates/templated_email/source/confirm_fulfillment.mjml
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
<mjml>
<mj-head>
<mj-include path="./shared/styles" />
<mj-include path="./shared/styles.mjml" />
</mj-head>
<mj-body>
<mj-container>
<mj-section css-class="no-display">
<mj-column>
<mj-text>
{% load i18n %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/header" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Fulfillment confirmation email text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Fulfillment confirmation email text" %}
Thank you for your order. Below is the list of shipped products.
<mj-raw>
{% load i18n %}
</mj-raw>
<mj-include path="./shared/header.mjml" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Fulfillment confirmation email text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Fulfillment confirmation email text" %}
Thank you for your order. Below is the list of shipped products.
{% endblocktrans %}
{% if fulfillment.tracking_number %}
{% blocktrans trimmed with tracking_number=fulfillment.tracking_number context "Fulfillment confirmation email text" %}
You can track your shipment with {{ tracking_number }} code.
{% endblocktrans %}
{% if fulfillment.tracking_number %}
{% blocktrans trimmed with tracking_number=fulfillment.tracking_number context "Fulfillment confirmation email text" %}
You can track your shipment with {{ tracking_number }} code.
{% endblocktrans %}
{% endif %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./partials/_fulfillment_lines" />
<mj-include path="./shared/footer" />
</mj-container>
{% endif %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./partials/_fulfillment_lines.mjml" />
<mj-include path="./shared/footer.mjml" />
</mj-body>
</mjml>
42 changes: 18 additions & 24 deletions templates/templated_email/source/confirm_note.mjml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
<mjml>
<mj-head>
<mj-include path="./shared/styles" />
<mj-include path="./shared/styles.mjml" />
</mj-head>
<mj-body>
<mj-container>
<mj-section css-class="no-display">
<mj-column>
<mj-text>
{% load i18n %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/header" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Note confirmation e-mail text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Note confirmation e-mail text" %}
A new note has been added to your order. To see details please visit: <a href="{{ url }}">{{ url }}</a>
{% endblocktrans %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/footer" />
</mj-container>
<mj-raw>
{% load i18n %}
</mj-raw>
<mj-include path="./shared/header.mjml" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Note confirmation e-mail text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Note confirmation e-mail text" %}
A new note has been added to your order. To see details please visit: <a href="{{ url }}">{{ url }}</a>
{% endblocktrans %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/footer.mjml" />
</mj-body>
</mjml>
98 changes: 46 additions & 52 deletions templates/templated_email/source/confirm_order.mjml
Original file line number Diff line number Diff line change
@@ -1,58 +1,52 @@
<mjml>
<mj-head>
<mj-include path="./shared/styles" />
<mj-include path="./shared/styles.mjml" />
</mj-head>
<mj-body>
<mj-container>
<mj-section css-class="no-display">
<mj-column>
<mj-text>
{% load i18n %}
{% load i18n_address_tags %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/header" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Order confirmation e-mail text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Order confirmation e-mail text" %}
Thank you for your order. Below is the list of ordered products. To see your payment details please visit: <a href="{{ url }}">{{ url }}</a>
{% endblocktrans %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./partials/_order_lines" />
<mj-section>
<mj-column>
<mj-table>
<thead class="table-header-row">
<tr>
<th>{% trans "Billing address" context "Order confirmation e-mail billing address" %}</th>
<th>{% trans "Shipping address" context "Order confirmation e-mail shipping address" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="address">
{% format_address order.billing_address %}
</td>
<td css-class="address">
{% if order.shipping_address %}
{% format_address order.shipping_address %}
{% else %}
{% trans "No shipping required" context "Order confirmation e-mail text" %}
{% endif %}
</td>
</tr>
</tbody>
</mj-table>
</mj-column>
</mj-section>
<mj-include path="./shared/footer" />
</mj-container>
<mj-raw>
{% load i18n %}
{% load i18n_address_tags %}
</mj-raw>
<mj-include path="./shared/header.mjml" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Order confirmation e-mail text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Order confirmation e-mail text" %}
Thank you for your order. Below is the list of ordered products. To see your payment details please visit: <a href="{{ url }}">{{ url }}</a>
{% endblocktrans %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./partials/_order_lines.mjml" />
<mj-section>
<mj-column>
<mj-table>
<thead class="table-header-row">
<tr>
<th>{% trans "Billing address" context "Order confirmation e-mail billing address" %}</th>
<th>{% trans "Shipping address" context "Order confirmation e-mail shipping address" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="address">
{% format_address order.billing_address %}
</td>
<td css-class="address">
{% if order.shipping_address %}
{% format_address order.shipping_address %}
{% else %}
{% trans "No shipping required" context "Order confirmation e-mail text" %}
{% endif %}
</td>
</tr>
</tbody>
</mj-table>
</mj-column>
</mj-section>
<mj-include path="./shared/footer.mjml" />
</mj-body>
</mjml>
42 changes: 18 additions & 24 deletions templates/templated_email/source/confirm_payment.mjml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
<mjml>
<mj-head>
<mj-include path="./shared/styles" />
<mj-include path="./shared/styles.mjml" />
</mj-head>
<mj-body>
<mj-container>
<mj-section css-class="no-display">
<mj-column>
<mj-text>
{% load i18n %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/header" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Payment confirmation e-mail text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Payment confirmation e-mail text" %}
Thank you for your payment. To see your payment details please visit: <a href="{{ url }}">{{ url }}</a>
{% endblocktrans %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/footer" />
</mj-container>
<mj-raw>
{% load i18n %}
</mj-raw>
<mj-include path="./shared/header.mjml" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Payment confirmation e-mail text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Payment confirmation e-mail text" %}
Thank you for your payment. To see your payment details please visit: <a href="{{ url }}">{{ url }}</a>
{% endblocktrans %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/footer.mjml" />
</mj-body>
</mjml>
12 changes: 4 additions & 8 deletions templates/templated_email/source/partials/_order_lines.mjml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<mj-section css-class="no-display">
<mj-column>
<mj-text>
{% load price from taxed_prices %}
{% load voucher %}
</mj-text>
</mj-column>
</mj-section>
<mj-raw>
{% load price from taxed_prices %}
{% load voucher %}
</mj-raw>
<mj-section>
<mj-column>
<mj-table>
Expand Down
54 changes: 24 additions & 30 deletions templates/templated_email/source/password_reset.mjml
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
<mjml>
<mj-head>
<mj-include path="./shared/styles" />
<mj-include path="./shared/styles.mjml" />
</mj-head>
<mj-body>
<mj-container>
<mj-section css-class="no-display">
<mj-column>
<mj-text>
{% load i18n %}
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/header" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Password reset e-mail text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Password reset e-mail text" %}
You're receiving this e-mail because you or someone else has requested a password for your user account at {{ domain }}.<br/>
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.
{% endblocktrans %}
</mj-text>
<mj-text>
<a href="{{ protocol}}://{{ domain }}{% url 'account:reset-password-confirm' uidb64=uid token=token %}">
{{ protocol}}://{{ domain }}{% url 'account:reset-password-confirm' uidb64=uid token=token %}
</a>
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/footer" />
</mj-container>
<mj-raw>
{% load i18n %}
</mj-raw>
<mj-include path="./shared/header.mjml" />
<mj-section>
<mj-column>
<mj-text font-size="16px">
{% trans "Hi!" context "Password reset e-mail text" %}
</mj-text>
<mj-text>
{% blocktrans trimmed context "Password reset e-mail text" %}
You're receiving this e-mail because you or someone else has requested a password for your user account at {{ domain }}.<br/>
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.
{% endblocktrans %}
</mj-text>
<mj-text>
<a href="{{ protocol}}://{{ domain }}{% url 'account:reset-password-confirm' uidb64=uid token=token %}">
{{ protocol}}://{{ domain }}{% url 'account:reset-password-confirm' uidb64=uid token=token %}
</a>
</mj-text>
</mj-column>
</mj-section>
<mj-include path="./shared/footer.mjml" />
</mj-body>
</mjml>
Loading

0 comments on commit 76c4924

Please sign in to comment.