workout-challenge/src-backend/custom_user/templates/email_weekly.mjml
2025-09-27 18:19:06 +01:00

270 lines
No EOL
14 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<mjml>
<!-- Written with https://mjml.io/ -->
<mj-head>
<mj-preview>Keep the momentum going keep the streak alive! Aim for 150-300 minutes of moderate or 75-150 minutes of vigorous activity weekly (or an equivalent mix) spread over at least 2 days, as recommended by the WHO.</mj-preview>
<mj-attributes>
<mj-text line-height="1.2" />
</mj-attributes>
<mj-style inline="inline">
td div .streak {
height: 25px;
width: 25px;
margin-left: auto;
margin-right: auto;
justify-content: center;
align-items: center;
display: flex;
border: 2px solid #075971;
border-radius: 9999px;
color: #075971;
font-weight: bold;
}
td div .day {
height: 25px;
width: 25px;
margin-left: auto;
margin-right: auto;
justify-content: center;
align-items: center;
display: flex;
border-radius: 9999px;
}
.calendar {
width: 35px;
height: 35px;
text-align: center;
padding: 0px;
}
</mj-style>
</mj-head>
<mj-body background-color="#E1E8ED">
<mj-hero mode="fixed-height" height="200px" background-url="{{ MAIN_HOST }}/running_email.jpg" background-size="cover" background-repeat="no-repeat" background-color="#075985">
<mj-text align="center" font-size="30px" color="#ffffff" padding-bottom="10px" padding-top="45px" css-class="no-invert">
Workout Challenge
</mj-text>
<mj-button background-color="#075985" color="#fff" border-radius="24px" border="1px solid #fff" href="{{ MAIN_HOST }}/login" font-family="Helvetica, Arial, sans-serif" padding="10px 25px">
LOGIN
</mj-button>
</mj-hero>
<mj-section padding-top="0px" padding-bottom="0px" background-color="white">
<mj-column padding-bottom="0px">
<mj-text padding-bottom="0px">
<p>Hi {{ first_name }},</p>
<p>Lets check in on your week!</p>
<p>Keep the momentum going keep the streak alive!</p>
<p>Aim for 150-300 minutes of moderate or 75-150 minutes of vigorous activity weekly (or an equivalent mix) spread over at least 2 days, as recommended by the WHO.</p>
</mj-text>
<mj-divider border-color="#E1E8ED" border-width="2px"></mj-divider>
</mj-column>
</mj-section>
<mj-section background-color="white" padding-top="5px">
<mj-column padding-top="0px">
<mj-text padding-bottom="0px">
<h3>Your Streak:</h3>
</mj-text>
<mj-table padding-top="0px">
<tr class="calendar">
<th>M</th>
<th>T</th>
<th>W</th>
<th>T</th>
<th>F</th>
<th>S</th>
<th>S</th>
</tr>
<mj-raw> {% for week in calendar %} </mj-raw>
<tr class="calendar">
<mj-raw> {% for day in week %} </mj-raw>
<td>
<!--[if mso]>
<v:oval xmlns:v="urn:schemas-microsoft-com:vml" style="height:30px;width:30px;" strokecolor="white" strokeweight="1px" fillcolor="{{ day.background_color }}">
<v:textbox inset="0,0,0,0">
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" valign="middle">
<font style="font-size:14px; color:{{ day.color }};">{{ day.day }}</font>
</td>
</tr>
</table>
</v:textbox>
</v:oval>
<![endif]-->
<!--[if !mso]><!-->
<div class="day" style="background-color: {{ day.background_color }}; color: {{ day.color }};">{{ day.day }}</div>
<!--<![endif]-->
</td>
<mj-raw> {% endfor %} </mj-raw>
</tr>
<mj-raw> {% endfor %} </mj-raw>
<tr>
<td colspan="7" style="padding-top:5px;padding-bottom:5px;text-align:center; font-family:Arial, sans-serif; background-color:#F3F7FA;">
<span style="display:inline-block; width:25px; height:25px; line-height:25px; text-align:center; mso-line-height-rule:exactly; mso-table-lspace:0pt; mso-table-rspace:0pt; border:2px solid #60A8D8; border-radius:50%; background-color:#60A8D8; color:#FFFFFF; font-weight:bold; font-family:Arial, sans-serif;">
&#10003;
</span>
<span style="display:inline-block; height:25px; line-height: 25px; text-align: center;padding-left:5px; mso-table-lspace:0pt; mso-table-rspace:0pt;color: #6b7280;font-weight:bold;">{{ week_streak }} Week Streak</span>
</td>
</tr>
</mj-table>
</mj-column>
<mj-column>
<mj-raw>
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="" width="100%">
<tbody>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;padding-bottom:0px;word-break:break-word;">
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1.2;text-align:left;color:#000000;">
<h3>Your Personal 7-Day Goals:</h3>
</div>
</td>
</tr>
<tr>
<td align="left" style="font-size:0px;padding:10px 25px;padding-top:0px;word-break:break-word;">
{% if goals.active_days is not None %}
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="height:10px; font-size:0; line-height:0;">&nbsp;</td>
</tr>
<tr>
<td style="background-color:#f9f9f9; border-radius:8px; padding:18px;">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="font-size:14px; line-height:16px; mso-line-height-rule:exactly; font-weight:bold; color: #6b7280;">Active Days</td>
<td align="right" style="font-size:14px; line-height:16px; mso-line-height-rule:exactly; color: #6b7280;">{{ goals.active_days.recorded }} days <span style="font-size:10px;">/ {{ goals.active_days.target }} days</span></td>
</tr>
<tr>
<td colspan="2" height="12" style="padding-top:8px; line-height:0; font-size:0;">
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" arcsize="50%" strokecolor="#e5e5e5" strokeweight="1px" style="width:{{ goals.active_days.percent_vml }}%;height:12px;" fillcolor="#4a78b5">
<v:fill color="#4a78b5" />
</v:roundrect>
<![endif]-->
<!--[if !mso]><!-- -->
<div style="background:#e5e5e5; border-radius:4px; width:100%; height:12px;">
<div style="background:#4a78b5; height:12px; border-radius:4px; width:{{ goals.active_days.percent }}%;"></div>
</div>
<!--<![endif]-->
</td>
</tr>
</table>
</td>
</tr>
</table>
{% endif %}
{% if goals.minutes is not None %}
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="height:15px; font-size:0; line-height:0;">&nbsp;</td>
</tr>
<tr>
<td style="background-color:#f9f9f9; border-radius:8px; padding:18px;">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="font-size:14px; line-height:16px; mso-line-height-rule:exactly; font-weight:bold; color: #6b7280;">Exercise</td>
<td align="right" style="font-size:14px; line-height:16px; mso-line-height-rule:exactly; color: #6b7280;">{{ goals.minutes.recorded }} min <span style="font-size:10px;">/ {{ goals.minutes.target }} min</span></td>
</tr>
<tr>
<td colspan="2" height="12" style="padding-top:8px; line-height:0; font-size:0;">
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" arcsize="50%" strokecolor="#e5e5e5" strokeweight="1px" style="width:{{ goals.minutes.percent_vml }}%;height:12px;" fillcolor="#4a78b5">
<v:fill color="#4a78b5" />
</v:roundrect>
<![endif]-->
<!--[if !mso]><!-- -->
<div style="background:#e5e5e5; border-radius:4px; width:100%; height:12px;">
<div style="background:#4a78b5; height:12px; border-radius:4px; width:{{ goals.minutes.percent }}%;"></div>
</div>
<!--<![endif]-->
</td>
</tr>
</table>
</td>
</tr>
</table>
{% endif %}
{% if goals.distance is not None %}
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="height:15px; font-size:0; line-height:0;">&nbsp;</td>
</tr>
<tr>
<td style="background-color:#f9f9f9; border-radius:8px; padding:18px;">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td style="font-size:14px; line-height:16px; mso-line-height-rule:exactly; font-weight:bold; color: #6b7280;">Distance</td>
<td align="right" style="font-size:14px; line-height:16px; mso-line-height-rule:exactly; color: #6b7280;">{{ goals.distance.recorded }} km <span style="font-size:10px;">/ {{ goals.distance.target }} km</span></td>
</tr>
<tr>
<td colspan="2" height="12" style="padding-top:8px; line-height:0; font-size:0;">
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" arcsize="50%" strokecolor="#e5e5e5" strokeweight="1px" style="width:{{ goals.distance.percent_vml }}%;height:12px;" fillcolor="#4a78b5">
<v:fill color="#4a78b5" />
</v:roundrect>
<![endif]-->
<!--[if !mso]><!-- -->
<div style="background:#e5e5e5; border-radius:4px; width:100%; height:12px;">
<div style="background:#4a78b5; height:12px; border-radius:4px; width:{{ goals.distance.percent }}%;"></div>
</div>
<!--<![endif]-->
</td>
</tr>
</table>
</td>
</tr>
</table>
{% endif %}
</td>
</tr>
</tbody>
</table>
</mj-raw>
</mj-column>
</mj-section>
<mj-raw> {% if openai_quote is not None %} </mj-raw>
<!-- AI Health Quote -->
<mj-section background-color="#075985" vertical-align="middle">
<mj-column width="100%" vertical-align="middle">
<mj-text align="center" color="#ffffff" font-size="16px" padding-bottom="10px" padding-top="20px">{{ openai_quote }}</mj-text>
<mj-divider border-color="#ffffff" border-style="solid" border-width="1px" padding-left="100px" padding-right="100px" padding-bottom="10px"></mj-divider>
<mj-text align="center" color="#e5e7eb" font-size="11px" padding-bottom="0px" padding-top="0px">
<p>by OpenAI's ChatGPT 4o</p>
</mj-text>
</mj-column>
</mj-section>
<mj-raw> {% endif %} </mj-raw>
<!-- Final remarks -->
<mj-section padding-top="0px" padding-bottom="0px" background-color="white">
<mj-column>
<mj-raw> {% if openai_quote is None %} </mj-raw>
<mj-divider border-color="#E1E8ED" border-width="2px"></mj-divider>
<mj-raw> {% endif %} </mj-raw>
<mj-text padding-top="20px">Login to see more detailed analyses, charts, and breakdowns:</mj-text>
<mj-button align="center" background-color="#075985" color="#ffffff" border-radius="24px" href="{{ MAIN_HOST }}/login" font-family="Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif" padding-bottom="2px" padding-top="5px">LOGIN</mj-button>
<mj-text padding-bottom="10px" padding-top="0px">
<p>Enjoy the Competition.</p>
<p>Good luck!</p>
</mj-text>
</mj-column>
</mj-section>
<!-- Footnote -->
<mj-section full-width="full-width">
<mj-column width="100%" vertical-align="middle">
<mj-text align="center" color="#9a9ea6" font-size="11px" padding-bottom="0px" padding-top="0">
<span class="apple-link">Workout Challenge</span>
<br> Any issues? <a href="mailto:{{ EMAIL_REPLY_TO }}">Send us an Email</a>. <br> See the <a href="https://github.com/vanalmsick/workout_challenge">Source Code</a>.
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>